]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
clang-specific pragmas to suppress -Wmissing-braces.
authorSimon Tatham <anakin@pobox.com>
Sun, 5 Feb 2017 11:19:22 +0000 (11:19 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 5 Feb 2017 11:53:58 +0000 (11:53 +0000)
commit730a9fdfe3d624bb663557c67f89d2cf8b575964
tree3c07cc33cddc0d22ef21078e9b25167aa3384925
parent2e229cb179ccb35d97160e92b6987b3073496b5f
clang-specific pragmas to suppress -Wmissing-braces.

When I added some extra braces in commit 095072fa4 to suppress this
warning, I think in fact I did the wrong thing, because the
declaration syntax I was originally using is the Microsoft-recommended
one in spite of clang not liking it - I think MS would be within their
rights (should they feel like it) to add those missing braces in a
later version of the WinSock headers, which would make the current
warning-clean code stop compiling. So it's better to put the code back
as it was, and avoid the clang warning by using clang's
warning-suppression pragmas for just those declarations.

I've also done the same thing in winnet.c, for two initialisers of
IPv6 well-known addresses which had the same problem (but which I
didn't notice yesterday because a misjudged set of Windows version
macros had prevented me from compiling that file successfully at all).
windows/winnet.c
windows/winsecur.c