public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/108944] New: libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes. [memsetZeroBytes]
@ 2023-02-27 11:21 dcb314 at hotmail dot com
  2023-02-27 13:40 ` [Bug modula2/108944] " gaius at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2023-02-27 11:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108944

            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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-27 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 11:21 [Bug modula2/108944] New: libgm2/libm2pim/sckt.cc:254:3: warning: memset() called to fill 0 bytes. [memsetZeroBytes] dcb314 at hotmail dot com
2023-02-27 13:40 ` [Bug modula2/108944] " gaius at gcc dot gnu.org
2023-02-27 15:31 ` dcb314 at hotmail dot com
2023-02-27 16:30 ` cvs-commit at gcc dot gnu.org
2023-02-27 16:35 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).