Fix remaining -pedantic warnings.

Wgnu-zero-variadic-macro-arguments is fixed by:

 - A previous googletest roll fixing the warning in gmock.
 - Adding a dummy argument to AddTraceEvent so that the __VA_ARGS__ is
never empty in TraceEvent.h and doesn't require __VA_ARGS__ token
pasting with a comma.
 - Extracting the first parameter in DAWN_INSTANTIATE_TEST with some
preprocessor tricks instead of singling it out, to avoid __VA_ARGS__
token pasting with a comma.

Wmicrosoft-enum-value is fixed by a previous spirv-cross roll that fixes
the warning upstream.

Bug: dawn:394
Change-Id: Icfe037ae9549087e9d62b6f42f91958addbb53ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21483
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-05-13 08:01:55 +00:00
committed by Commit Bot service account
parent f4df7916ca
commit 60bb88d23c
3 changed files with 129 additions and 125 deletions

View File

@@ -106,23 +106,17 @@ config("dawn_internal") {
"-Wtautological-unsigned-zero-compare",
]
# clang-cl doesn't know -pedantic, pass it explicitly to the clang driver on Windows
if (is_win) {
cflags += [ "/clang:-pedantic" ]
cflags += [
# clang-cl doesn't know -pedantic, pass it explicitly to the clang driver
"/clang:-pedantic",
# Allow the use of __uuidof()
"-Wno-language-extension-token",
]
} else {
cflags += [ "-pedantic" ]
}
# On Windows allow the use of __uuidof()
if (is_win) {
cflags += [ "-Wno-language-extension-token" ]
}
# Flags for -pedantic warnings that haven't been fixed yet.
cflags += [
"-Wno-gnu-zero-variadic-macro-arguments",
"-Wno-microsoft-enum-value",
]
}
if (!is_clang && is_win) {