ALT Linux Bugzilla
– Attachment 13353 Details for
Bug 46345
nss: ошибка сборки с GCC 13
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
патч для исправления ошибки
0001-Fixed-build-error-with-GCC-13.patch (text/plain), 3.33 KB, created by
Alexey Sheplyakov
on 2023-06-01 07:58:47 MSK
(
hide
)
Description:
патч для исправления ошибки
Filename:
MIME Type:
Creator:
Alexey Sheplyakov
Created:
2023-06-01 07:58:47 MSK
Size:
3.33 KB
patch
obsolete
>From b984cb6d80d8daa04c35915ee88853e661eb4fb2 Mon Sep 17 00:00:00 2001 >From: Alexey Sheplyakov <asheplyakov@basealt.ru> >Date: Thu, 1 Jun 2023 04:50:32 +0000 >Subject: [PATCH] Fixed build error with GCC 13 > >For now disable -Wdangling-pointer in the problematic code. > >[1382/1456] CC obj/cmd/ecperf/ecperf.ecperf.o >FAILED: obj/cmd/ecperf/ecperf.ecperf.o >gcc -MMD -MF obj/cmd/ecperf/ecperf.ecperf.o.d -DNSS_USE_STATIC_LIBS -DNSS_FIPS_DISABLED -DNSS_NO_INIT_SUPPORT -DNSS_USE >_64 -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DLINUX2_1 -DLINUX -Dlinux -D_ >DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNDEBUG > -I../../lib/softoken -I/usr/include/nspr -I/usr/src/RPM/BUILD/nss-3.89.0/dist/private/nss -I/usr/src/RPM/BUILD/nss-3.8 >9.0/dist/public/dbm -I/usr/src/RPM/BUILD/nss-3.89.0/dist/public/nss -fPIC -pipe -ffunction-sections -fdata-sections -We >rror -Wall -Wshadow -O2 -std=c99 -c ../../cmd/ecperf/ecperf.c -o obj/cmd/ecperf/ecperf.ecperf.o >../../cmd/ecperf/ecperf.c: In function 'genericThread': >../../cmd/ecperf/ecperf.c:99:24: error: storing the address of local variable 'sig' in '*threadData.p2' [-Werror=dangli >ng-pointer=] > 99 | threadData->p2 = (void *)&sig; > | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ >../../cmd/ecperf/ecperf.c:91:13: note: 'sig' declared here > 91 | SECItem sig; > | ^~~ >../../cmd/ecperf/ecperf.c:86:21: note: 'data' declared here > 86 | genericThread(void *data) > | ~~~~~~^~~~ >../../cmd/ecperf/ecperf.c: In function 'PKCS11Thread': >../../cmd/ecperf/ecperf.c:71:24: error: storing the address of local variable 'sig' in '*threadData.p2' [-Werror=dangli >ng-pointer=] > 71 | threadData->p2 = (void *)&sig; > | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ >../../cmd/ecperf/ecperf.c:53:13: note: 'sig' declared here > 53 | SECItem sig; > | ^~~ >../../cmd/ecperf/ecperf.c:47:20: note: 'data' declared here > 47 | PKCS11Thread(void *data) > | ~~~~~~^~~~ >cc1: all warnings being treated as errors >--- > cmd/ecperf/ecperf.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c >index 705d68f3..fd98b9a9 100644 >--- a/cmd/ecperf/ecperf.c >+++ b/cmd/ecperf/ecperf.c >@@ -65,11 +65,18 @@ PKCS11Thread(void *data) > return; > } > >+#if defined(__GNUC__) && __GNUC__ >= 13 >+#pragma GCC diagnostic push >+#pragma GCC diagnostic ignored "-Wdangling-pointer" >+#endif > if (threadData->isSign) { > sig.data = sigData; > sig.len = sizeof(sigData); > threadData->p2 = (void *)&sig; > } >+#if defined(__GNUC__) && __GNUC__ >= 13 >+#pragma GCC diagnostic pop >+#endif > > while (iters--) { > threadData->status = (*op)(session, threadData->p1, >@@ -93,11 +100,18 @@ genericThread(void *data) > threadData->status = SECSuccess; > threadData->count = 0; > >+#if defined(__GNUC__) && __GNUC__ >= 13 >+#pragma GCC diagnostic push >+#pragma GCC diagnostic ignored "-Wdangling-pointer" >+#endif > if (threadData->isSign) { > sig.data = sigData; > sig.len = sizeof(sigData); > threadData->p2 = (void *)&sig; > } >+#if defined(__GNUC__) && __GNUC__ >= 13 >+#pragma GCC diagnostic pop >+#endif > > while (iters--) { > threadData->status = (*threadData->op)(threadData->p1, >-- >2.33.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46345
:
13353
|
13363