]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Replace DISABLE/ENABLE_GCC_WARNING with something that will confuse clang-format...
authorNick Mathewson <nickm@torproject.org>
Mon, 2 Dec 2019 21:57:37 +0000 (16:57 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 9 Jan 2020 12:30:35 +0000 (07:30 -0500)
src/lib/cc/compat_compiler.h

index 9e7436ca14508494497f3ac65ca1ed83a60ff3c9..cd359617ca8a9c260a500fff20d0a3b089ab2829 100644 (file)
@@ -59,8 +59,6 @@
 
 /* Temporarily enable and disable warnings. */
 #ifdef __GNUC__
-#  define PRAGMA_STRINGIFY_(s) #s
-#  define PRAGMA_JOIN_STRINGIFY_(a,b) PRAGMA_STRINGIFY_(a ## b)
 /* Support for macro-generated pragmas (c99) */
 #  define PRAGMA_(x) _Pragma (#x)
 #  ifdef __clang__
 /* we have push/pop support */
 #    define DISABLE_GCC_WARNING(warningopt) \
           PRAGMA_DIAGNOSTIC_(push) \
-          PRAGMA_DIAGNOSTIC_(ignored PRAGMA_JOIN_STRINGIFY_(-W,warningopt))
+          PRAGMA_DIAGNOSTIC_(ignored warningopt)
 #    define ENABLE_GCC_WARNING(warningopt) \
           PRAGMA_DIAGNOSTIC_(pop)
 #else /* !(defined(__clang__) || GCC_VERSION >= 406) */
 /* older version of gcc: no push/pop support. */
 #    define DISABLE_GCC_WARNING(warningopt) \
-         PRAGMA_DIAGNOSTIC_(ignored PRAGMA_JOIN_STRINGIFY_(-W,warningopt))
+         PRAGMA_DIAGNOSTIC_(ignored warningopt)
 #    define ENABLE_GCC_WARNING(warningopt) \
-         PRAGMA_DIAGNOSTIC_(warning PRAGMA_JOIN_STRINGIFY_(-W,warningopt))
+         PRAGMA_DIAGNOSTIC_(warning warningopt)
 #endif /* defined(__clang__) || GCC_VERSION >= 406 */
 #else /* !defined(__GNUC__) */
 /* not gcc at all */