]> granicus.if.org Git - curl/commit
tool_doswin: Fix uninitialized field warning
authorDaniel Gustafsson <daniel@yesql.se>
Sun, 18 Nov 2018 20:57:00 +0000 (21:57 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Sun, 18 Nov 2018 20:57:00 +0000 (21:57 +0100)
commitb88bf6e650a866330e5e6204e655bc4015c96a72
tree90c34cd89c71153a23603062b176dc12c06f8dee
parent1cccf2f94568b8391323c227f96eda6350d1a17a
tool_doswin: Fix uninitialized field warning

The partial struct initialization in 397664a065abffb7c3445ca9 caused
a warning on uninitialized MODULEENTRY32 struct members:

  /src/tool_doswin.c:681:3: warning: missing initializer for field
  'th32ModuleID' of 'MODULEENTRY32 {aka struct tagMODULEENTRY32}'
  [-Wmissing-field-initializers]

This is sort of a bogus warning as the remaining members will be set
to zero by the compiler, as all omitted members are. Nevertheless,
remove the warning by omitting all members and setting the dwSize
members explicitly.

Closes #3254
Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
src/tool_doswin.c