Ignore false-positive compiler warnings with gcc 10

This commit is contained in:
Daiki Ueno 2020-02-14 12:07:08 +01:00
parent 37c40ebd3d
commit 9e1e74ca17
2 changed files with 7 additions and 46 deletions

View File

@ -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);

View File

@ -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 <dueno@redhat.com> - 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 <releng@fedoraproject.org> - 3.49.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild