samples: Fix compiler warning
Clang will warn if using #if on an undefined macro Change-Id: I2db83ccd0304c39dd7328607f4bce6d6f80ee0d6 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37841 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
2f7fea1f19
commit
a7b52e33d5
|
@ -85,14 +85,14 @@ const char kUsage[] = R"(Usage: tint [options] <input-file>
|
|||
Affects AST dumping, and text-based output languages.
|
||||
-h -- This help text)";
|
||||
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4068; suppress : 4100)
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
Format parse_format(const std::string& fmt) {
|
||||
#pragma clang diagnostic pop
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4068)
|
||||
#endif
|
||||
|
||||
|
@ -134,14 +134,14 @@ bool ends_with(const std::string& input, const std::string& suffix) {
|
|||
|
||||
/// @param filename the filename to inspect
|
||||
/// @returns the inferred format for the filename suffix
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4068; suppress : 4100)
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
Format infer_format(const std::string& filename) {
|
||||
#pragma clang diagnostic pop
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4068)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue