Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index baf460acd14edea2beb50912ba84b98137fae92c..b23bd574409132ab009948d526040aa1ce216c5a 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -5254,11 +5254,60 @@ |
], |
'msvs_cygwin_shell': 0, |
'msvs_disabled_warnings': [ |
- 4351, 4355, 4396, 4503, 4819, |
+ # C4127: conditional expression is constant |
+ # This warning can in theory catch dead code and other problems, but |
+ # triggers in far too many desirable cases where the conditional |
+ # expression is either set by macros or corresponds some legitimate |
+ # compile-time constant expression (due to constant template args, |
+ # conditionals comparing the sizes of different types, etc.). Some of |
+ # these can be worked around, but it's not worth it. |
+ 4127, |
+ |
+ # C4351: new behavior: elements of array 'array' will be default |
+ # initialized |
+ # This is a silly "warning" that basically just alerts you that the |
+ # compiler is going to actually follow the language spec like it's |
+ # supposed to, instead of not following it like old buggy versions |
+ # did. There's absolutely no reason to turn this on. |
+ 4351, |
+ |
+ # C4355: 'this': used in base member initializer list |
+ # It's commonly useful to pass |this| to objects in a class' |
+ # initializer list. While this warning can catch real bugs, most of |
+ # the time the constructors in question don't attempt to call methods |
+ # on the passed-in pointer (until later), and annotating every legit |
+ # usage of this is simply more hassle than the warning is worth. |
+ 4355, |
+ |
+ # C4503: 'identifier': decorated name length exceeded, name was |
+ # truncated |
+ # This only means that some long error messages might have truncated |
+ # identifiers in the presence of lots of templates. It has no effect |
+ # on program correctness and there's no real reason to waste time |
+ # trying to prevent it. |
+ 4503, |
+ |
+ # C4611: interaction between 'function' and C++ object destruction is |
+ # non-portable |
+ # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN |
+ # suggests using exceptions instead of setjmp/longjmp for C++, but |
+ # Chromium code compiles without exception support. We therefore have |
+ # to use setjmp/longjmp for e.g. JPEG decode error handling, which |
+ # means we have to turn off this warning (and be careful about how |
+ # object destruction happens in such cases). |
+ 4611, |
+ |
# TODO(maruel): These warnings are level 4. They will be slowly |
# removed as code is fixed. |
- 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
- 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4706, |
+ 4100, # Unreferenced formal parameter |
+ 4121, # Alignment of a member was sensitive to packing |
+ 4189, # Local variable is initialized but not referenced |
+ 4244, # Conversion from 'type1' to 'type2', possible loss of data |
+ 4481, # Nonstandard extension used: override specifier 'keyword' |
+ 4505, # Unreferenced local function has been removed |
+ 4510, # Default constructor could not be generated |
+ 4512, # Assignment operator could not be generated |
+ 4610, # Object can never be instantiated |
], |
'msvs_settings': { |
'VCCLCompilerTool': { |