From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A7BD3858D35; Thu, 22 Jun 2023 17:27:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A7BD3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687454869; bh=kPFrAr2//hjYBksYHbZMfUnY1CSJGGliHUt+g+ndKZc=; h=From:To:Subject:Date:From; b=Mobt0ifWSIWdLMJGoB2H74ja9T1bufK+QU/WjPymR2gdwc3aFZTFEUqTg3YJTFNF5 Dsx1yiy3LnutQTVkD5lD0P7K6Y+1q8bLH1jCOX0hhpK+8seld0HBEWgD5rN39xPXbq pLVKkjy6frQjMOFk1R9c/GvIxsJGvvm/8AW9xcEI= From: "clugstj at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110368] New: Incorrect "is used uninitialized" warning message Date: Thu, 22 Jun 2023 17:27:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: clugstj at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110368 Bug ID: 110368 Summary: Incorrect "is used uninitialized" warning message Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: clugstj at gmail dot com Target Milestone: --- Created attachment 55384 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55384&action=3Dedit Code that causes warning The attached code, when compiled with: >gcc -O2 -Wall -Wextra -c uninit.c results in the following error messages: uninit.c: In function 'cksum': uninit.c:20:13: warning: 'l' is used uninitialized [-Wuninitialized] 20 | unsigned l =3D len; | ^ uninit.c:21:13: warning: 'n' is used uninitialized [-Wuninitialized] 21 | unsigned n =3D protocol; | ^=