From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E6AE3858D20; Mon, 27 Feb 2023 11:21:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E6AE3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677496917; bh=ch83vD+LtmtI8zrrvZUnlOeOlAM61q6IM+/8SQMBxrM=; h=From:To:Subject:Date:From; b=nZjCvBrsLs6w1RSifMZuCsFbWESzi4hk/yJdE2S1O56W+tLflWB3lH0akfmER/JjU pfDQ9+y0UOSTcdlBNgVvoFGrf67VW1MuGHDR0qPOUOs0FpAjRyjpjeXtcwpDAsRtdh aNYveGT+PsOV/AVKSGu8QGx+InIGX9vm/fxrzQjk= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108944] New: libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes. [memsetZeroBytes] Date: Mon, 27 Feb 2023 11:21:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone 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=3D108944 Bug ID: 108944 Summary: libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes. [memsetZeroBytes] Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Source code is memset (&sa, sizeof (struct sockaddr_in), 0); Parameters wrong way around. Maybe better code: memset (&sa, 0, sizeof (struct sockaddr_in)); Thanks to static analyser cppcheck for finding this problem.=