Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Thomason <leethomason@gmail.com>2022-04-02 23:44:42 +0300
committerGitHub <noreply@github.com>2022-04-02 23:44:42 +0300
commit34dd03ecc24602632589024e9ddd2865e38b84e3 (patch)
treec9f59a938e4eb0798e3d688e86265664f41b42c1
parentcf0a876aadad768a3df03675dcdf31e5dd7aa18e (diff)
parentc27699a9d6d5c6e89696e45fa9c51efa7fc7d116 (diff)
Merge pull request #884 from firewave/extra-stmt
fixed Clang -Wextra-stmt warnings with TIXMLASSERT
-rwxr-xr-xtinyxml2.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tinyxml2.h b/tinyxml2.h
index 452ae95..cfb1053 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -83,16 +83,16 @@ distribution.
#if defined(TINYXML2_DEBUG)
# if defined(_MSC_VER)
# // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like
-# define TIXMLASSERT( x ) if ( !((void)0,(x))) { __debugbreak(); }
+# define TIXMLASSERT( x ) do { if ( !((void)0,(x))) { __debugbreak(); } } while(false)
# elif defined (ANDROID_NDK)
# include <android/log.h>
-# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); }
+# define TIXMLASSERT( x ) do { if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } } while(false)
# else
# include <assert.h>
# define TIXMLASSERT assert
# endif
#else
-# define TIXMLASSERT( x ) {}
+# define TIXMLASSERT( x ) do {} while(false)
#endif
#endif