aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-12-20 18:35:32 -0500
committerDavid Robillard <d@drobilla.net>2025-12-20 18:35:32 -0500
commite38b5faa9e936597a81aa8233ab7a4038de96881 (patch)
tree2a73889f8b8af6ac6970c1fe6fb6fb3a2697d498
parent39ebe33b53158ec37ac8ad720350c8982c44fc76 (diff)
downloadlv2-e38b5faa9e936597a81aa8233ab7a4038de96881.tar.xz
Use concise preprocessor directives
-rw-r--r--include/lv2/core/attributes.h4
-rw-r--r--test/cpp/test_build.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/lv2/core/attributes.h b/include/lv2/core/attributes.h
index 2db876f..2ac9cf5 100644
--- a/include/lv2/core/attributes.h
+++ b/include/lv2/core/attributes.h
@@ -19,7 +19,7 @@
# define LV2_DEPRECATED
#endif
-#if defined(__clang__)
+#ifdef __clang__
# define LV2_DISABLE_DEPRECATION_WARNINGS \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
@@ -31,7 +31,7 @@
# define LV2_DISABLE_DEPRECATION_WARNINGS
#endif
-#if defined(__clang__)
+#ifdef __clang__
# define LV2_RESTORE_WARNINGS _Pragma("clang diagnostic pop")
#elif defined(__GNUC__) && __GNUC__ > 4
# define LV2_RESTORE_WARNINGS _Pragma("GCC diagnostic pop")
diff --git a/test/cpp/test_build.cpp b/test/cpp/test_build.cpp
index 73868a4..19e8e56 100644
--- a/test/cpp/test_build.cpp
+++ b/test/cpp/test_build.cpp
@@ -1,7 +1,7 @@
// Copyright 2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
-#if defined(__clang__)
+#ifdef __clang__
_Pragma("clang diagnostic push")
_Pragma("clang diagnostic ignored \"-Wold-style-cast\"")
_Pragma("clang diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
@@ -47,7 +47,7 @@ main()
return 0;
}
-#if defined(__clang__)
+#ifdef __clang__
_Pragma("clang diagnostic pop")
#elif defined(__GNUC__)
_Pragma("GCC diagnostic pop")