From 9e1e74ca17a6a769ad11be23c73c88647d036061 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 14 Feb 2020 12:07:08 +0100 Subject: [PATCH] Ignore false-positive compiler warnings with gcc 10 --- nss-libpkix-maybe-uninitialized.patch | 44 --------------------------- nss.spec | 9 ++++-- 2 files changed, 7 insertions(+), 46 deletions(-) delete mode 100644 nss-libpkix-maybe-uninitialized.patch diff --git a/nss-libpkix-maybe-uninitialized.patch b/nss-libpkix-maybe-uninitialized.patch deleted file mode 100644 index 27ee375..0000000 --- a/nss-libpkix-maybe-uninitialized.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/lib/libpkix/pkix/util/pkix_list.c b/lib/libpkix/pkix/util/pkix_list.c ---- a/lib/libpkix/pkix/util/pkix_list.c -+++ b/lib/libpkix/pkix/util/pkix_list.c -@@ -1530,17 +1530,17 @@ cleanup: - */ - PKIX_Error * - PKIX_List_SetItem( - PKIX_List *list, - PKIX_UInt32 index, - PKIX_PL_Object *item, - void *plContext) - { -- PKIX_List *element; -+ PKIX_List *element = NULL; - - PKIX_ENTER(LIST, "PKIX_List_SetItem"); - PKIX_NULLCHECK_ONE(list); - - if (list->immutable){ - PKIX_ERROR(PKIX_OPERATIONNOTPERMITTEDONIMMUTABLELIST); - } - -diff --git a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c ---- a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c -+++ b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c -@@ -102,17 +102,17 @@ cleanup: - */ - static PKIX_Error * - pkix_pl_OID_Equals( - PKIX_PL_Object *first, - PKIX_PL_Object *second, - PKIX_Boolean *pResult, - void *plContext) - { -- PKIX_Int32 cmpResult; -+ PKIX_Int32 cmpResult = 0; - - PKIX_ENTER(OID, "pkix_pl_OID_Equals"); - PKIX_NULLCHECK_THREE(first, second, pResult); - - PKIX_CHECK(pkix_pl_OID_Comparator - (first, second, &cmpResult, plContext), - PKIX_OIDCOMPARATORFAILED); - diff --git a/nss.spec b/nss.spec index 80eb622..bca2a8b 100644 --- a/nss.spec +++ b/nss.spec @@ -112,7 +112,6 @@ Patch10: nss-3.47-ike-fix.patch # as it still doesn't work under FIPS mode because of missing HKDF # support in PKCS #11. Patch11: nss-tls13-default.patch -Patch12: nss-libpkix-maybe-uninitialized.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -274,6 +273,12 @@ export BUILD_OPT=1 # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS +# Work around false-positive warnings with gcc 10: +# https://bugzilla.redhat.com/show_bug.cgi?id=1803029 +%ifarch s390x +export XCFLAGS="$XCFLAGS -Wno-error=maybe-uninitialized" +%endif + export LDFLAGS=$RPM_LD_FLAGS export DSO_LDOPTS=$RPM_LD_FLAGS @@ -879,7 +884,7 @@ update-crypto-policies &> /dev/null || : %changelog * Fri Feb 14 2020 Daiki Ueno - 3.49.2-3 -- Suppress compiler warning (treated as fatal) in libpkix +- Ignore false-positive compiler warnings with gcc 10 * Wed Jan 29 2020 Fedora Release Engineering - 3.49.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild