Some people seem to advise you use -Wall, but when I did it on a small test project which just has a main.cpp with some includes, I get 5800 warnings most of them in standar
I have the same initial problem when compiling various software stacks with VC6 and Microsoft Platform SDK (in BaseTsd.h for example).
What I (we) want to do is to control the compiler warning level for our code - we want to be able to play with the /W flag. In practice, as already pointed out, /W4 enables all generally useful warnings (and also some spurious...).
As the problem comes from the MSFT header files, I modify in a clean way the Microsoft-supplied header files. There are not so many changes to implement.
If compiler complains with warning C4305, in the source file I insert:
#pragma warning( disable : 4305)
before the offending line, followed by:
#pragma warning( default : 4305)
after the offending line. No side effect. Microsoft could have done it this way, probably.