From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A50DA3858C83; Tue, 19 Apr 2022 22:04:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A50DA3858C83 From: "mark at klomp dot org" To: bzip2-devel@sourceware.org Subject: =?UTF-8?B?W0J1ZyBiemlwMi8yODkwNF0gbGliYnppcDI6IOKAmGNvc3RbM10=?= =?UTF-8?B?4oCZIG1heSBiZSB1c2VkIHVuaW5pdGlhbGl6ZWQgaW4gdGhpcyBmdW5jdGlv?= =?UTF-8?B?biBbLVdtYXliZS11bmluaXRpYWxpemVkXQ==?= Date: Tue, 19 Apr 2022 22:04:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: bzip2 X-Bugzilla-Component: bzip2 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2022 22:04:52 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28904 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-04-19 Ever confirmed|0 |1 CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- Sorry for the late reply. I think you are right that initializing these two small (6 ints) arrays at = the start of the function is fine if it helps the compiler. I haven't been able to reproduce the compiler warning myself though. My proposed patch would be: diff --git a/compress.c b/compress.c index 5dfa002..c825c78 100644 --- a/compress.c +++ b/compress.c @@ -253,8 +253,8 @@ void sendMTFValues ( EState* s ) --*/ - UInt16 cost[BZ_N_GROUPS]; - Int32 fave[BZ_N_GROUPS]; + UInt16 cost[BZ_N_GROUPS] =3D { 0 }; + Int32 fave[BZ_N_GROUPS] =3D { 0 }; UInt16* mtfv =3D s->mtfv; { 0 } initializes the whole array with zero, so we don't have to know the e= xact number of elements. Does the above work for you? --=20 You are receiving this mail because: You are on the CC list for the bug.=