From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C1D93858D39; Mon, 27 Feb 2023 15:31:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C1D93858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677511905; bh=Q5CL5jUgDNj4gqkys24xHiukssUDlEGmkl6DtnfScfM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ofU7Zg3yLZSUJUWwKdrROpU25YIdRtZSFr7LAuWyNovwUYTfE+5PlLLTUh+OZhHgw RIxt8lKFf0f1AVHSJAmiF10Qre6A1JUfc14tgceNAHS/rNYGdB4n3dSVAYrpJaMt6X RJH3jcHzVLJmK1jDfyN22PN71Z8m068nSpyBKYxs= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108944] libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes. [memsetZeroBytes] Date: Mon, 27 Feb 2023 15:31:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D108944 --- Comment #2 from David Binderman --- (In reply to Gaius Mulley from comment #1) > Thank you very much for reporting this bug - very useful regarding PR1088= 35=20 > (or at least it is related and timely). You are welcome. gcc flags -Wall and -Wmemset-transposed-args seem to provide this warning. For example: memset.cc:17:15: warning: =E2=80=98memset=E2=80=99 used with constant zero = length parameter; thi s could be due to transposed parameters [-Wmemset-transposed-args] 17 | memset( t.buf1, 20, 0); | ~~~~~~^~~~~~~~~~~~~~~~=