From a4d9b31978ec6983b684171ec3ac3a16e232de84dfc863734c8664e808a545ce Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Mon, 22 Aug 2016 12:58:09 +0000 Subject: [PATCH] - fix build on certain toolchains (nss-uninitialized.patch) jarfile.c:805:13: error: 'it' may be used uninitialized in this function [-Werror=maybe-uninitialized] OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/mozilla-nss?expand=0&rev=219 --- mozilla-nss.changes | 7 +++++++ mozilla-nss.spec | 2 ++ nss-uninitialized.patch | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 nss-uninitialized.patch diff --git a/mozilla-nss.changes b/mozilla-nss.changes index 34c92b3..c1d030c 100644 --- a/mozilla-nss.changes +++ b/mozilla-nss.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 22 12:54:15 UTC 2016 - wr@rosenauer.org + +- fix build on certain toolchains (nss-uninitialized.patch) + jarfile.c:805:13: error: 'it' may be used uninitialized in this + function [-Werror=maybe-uninitialized] + ------------------------------------------------------------------- Thu Aug 4 20:28:32 UTC 2016 - wr@rosenauer.org diff --git a/mozilla-nss.spec b/mozilla-nss.spec index 743594d..5e3f81c 100644 --- a/mozilla-nss.spec +++ b/mozilla-nss.spec @@ -51,6 +51,7 @@ Source9: pkcs11.txt Source99: %{name}.changes Patch1: nss-opt.patch Patch2: system-nspr.patch +Patch3: nss-uninitialized.patch Patch4: nss-no-rpath.patch Patch5: renegotiate-transitional.patch Patch6: malloc.patch @@ -169,6 +170,7 @@ Mozilla project. cd nss %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 %if %suse_version > 1110 diff --git a/nss-uninitialized.patch b/nss-uninitialized.patch new file mode 100644 index 0000000..edfbe58 --- /dev/null +++ b/nss-uninitialized.patch @@ -0,0 +1,22 @@ +diff --git a/lib/jar/jarfile.c b/lib/jar/jarfile.c +--- a/lib/jar/jarfile.c ++++ b/lib/jar/jarfile.c +@@ -652,17 +652,17 @@ jar_gen_index(JAR *jar, jarArch format, + * List the physical contents of a Phil Katz + * style .ZIP file into the JAR linked list. + * + */ + static int + jar_listzip(JAR *jar, JAR_FILE fp) + { + ZZLink *ent; +- JAR_Item *it; ++ JAR_Item *it = NULL; + JAR_Physical *phy = NULL; + struct ZipLocal *Local = PORT_ZNew(struct ZipLocal); + struct ZipCentral *Central = PORT_ZNew(struct ZipCentral); + struct ZipEnd *End = PORT_ZNew(struct ZipEnd); + + int err = 0; + long pos = 0L; + unsigned int compression;