Adding /analyze support to common.gypi through GYP_DEFINES=win_analyze=1, and suppres...
commit4b6961df21fb1475efd3f6713ef5c34b1763d748
authorbrucedawson <brucedawson@chromium.org>
Tue, 28 Oct 2014 22:18:04 +0000 (28 15:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 28 Oct 2014 22:18:18 +0000 (28 22:18 +0000)
tree7248f5ec46e5e579d5ad85aafcdff18c6d0709fe
parentedb0ccdf75d9133adfcf9d3ef28c81f8075a7746
Adding /analyze support to common.gypi through GYP_DEFINES=win_analyze=1, and suppress one very noisy warning.

When win_analyze=1 is specified then /analyze is added to the command
line to enable static code analysis with VC++.
WarnAsErrors is set to false to allow reporting of all errors.
Additional, WX- is added to disable WarnAsErrors more robustly, necessary because some projects override WarnAsErrors.
Additionally, many noisy but low-value warnings are suppressed.
Finally, _USING_V110_SDK71_ is un-set when win_analyze is true because
this is incompatible with /analyze.

The change to callback_internal.h suppresses an extremely noisy warning about a potentially incorrect use of sizeof():
    base\callback_internal.h(80) : warning C6334: sizeof operator applied to an expression with an operator might yield unexpected results:  Parentheses can be used to disambiguate certain usages.

With this change almost all of Chrome can be built with high but useful levels of warnings.

bug=427616

Review URL: https://codereview.chromium.org/676743003

Cr-Commit-Position: refs/heads/master@{#301723}
base/callback_internal.h
build/common.gypi