summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Gerey <yvesg@google.com>2018-11-09 18:44:47 +0100
committerYves Gerey <yvesg@google.com>2018-11-09 18:44:47 +0100
commite701d16949cf86a65f9f5d3ecba253e3bafd13c9 (patch)
tree2e207dbe1d38eac72d838b71ac7385113fe56d7d
parent0e9e5befa05e964279f2648a5d03f62133c3a457 (diff)
downloadnasm-e701d16949cf86a65f9f5d3ecba253e3bafd13c9.tar.gz
Fix windows build warnings for MSVC.
Warnings were only muted for clang. Bug: chromium:766721 Change-Id: Ie7871b791ea3bc0013c774d9a8118cc0eab302aa
-rw-r--r--BUILD.gn16
1 files changed, 16 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 05b3336d..c85d2592 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -61,6 +61,22 @@ config("nasm_config") {
# NASM sometimes compares enums to unsigned integers.
"-Wno-sign-compare",
]
+ } else if (is_win) {
+ # Please note that's a slightly different set of warnings.
+ cflags = [
+ # NASM sometimes redefines macros from its config.h.
+ "/wd4005", # macro redefinition
+
+ # NASM sometimes compares enums to unsigned integers.
+ "/wd4018", # sign compare
+
+ # NASM comment: Uninitialized -> all zero by C spec
+ # Or sometimes one const struct is forward declared for no reason.
+ "/wd4132", # const object should be initialized
+
+ # NASM uses "(-x) & 0xFF" pattern to negate byte.
+ "/wd4146", # unary minus operator applied to unsigned type
+ ]
}
}