From d3fac786da011cb53e94ecaf96eca955dfc05fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Sk=C3=B6ld?= Date: Tue, 30 Jan 2018 21:29:22 -0800 Subject: [PATCH] Silencing warnings about potential comma mis-use. --- 3rdparty/stb/stb_image.h | 6 ++++++ 3rdparty/tinyexr/tinyexr.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/3rdparty/stb/stb_image.h b/3rdparty/stb/stb_image.h index 3ce6d8f..d7d3e1a 100644 --- a/3rdparty/stb/stb_image.h +++ b/3rdparty/stb/stb_image.h @@ -1,3 +1,9 @@ +#if defined(__has_warning) +# if __has_warning("-Wcomma") +# pragma GCC diagnostic ignored "-Wcomma" // Possible misuse of comma operator here +# endif +#endif + #if defined(_MSC_VER) # pragma warning(disable:4244) // warning C4244: '=': conversion from 'int' to 'stbi__uint16', possible loss of data # pragma warning(disable:4245) // warning C4245: 'argument': conversion from 'int' to 'char', signed/unsigned mismatch diff --git a/3rdparty/tinyexr/tinyexr.h b/3rdparty/tinyexr/tinyexr.h index b0998b6..2d8e2b4 100644 --- a/3rdparty/tinyexr/tinyexr.h +++ b/3rdparty/tinyexr/tinyexr.h @@ -1,3 +1,9 @@ +#if defined(__has_warning) +# if __has_warning("-Wcomma") +# pragma GCC diagnostic ignored "-Wcomma" // Possible misuse of comma operator here +# endif +#endif + /* Copyright (c) 2014 - 2016, Syoyo Fujita All rights reserved.