The Most Underused Compiler Switches in Visual C++, March 11, 2014 Microsoft's Visual C++ team explains the nine most underused switches and why you should make sure to include them in your build.
/WX is both a compiler and linker switch that treats all warnings as errors. The switch is off by default and needs to enabled separately for both the compiler and the linker.
For both new and existing projects, it may be best to use
/WX in all compilations. Resolving all warnings will ensure the fewest possible hard-to-find code defects. In lots of cases, you might ignore compiler warnings only to discover later that this actually led to undesirable runtime side effects. Hence, many teams at Microsoft use
/WX as the default compilation flag to make sure all warnings are explicitly taken care of.