diff options
author | David Robillard <d@drobilla.net> | 2020-07-16 12:30:28 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-16 23:37:49 +0200 |
commit | d4092e2936524c4cf003b6ef8d90d6b9a28b8ba5 (patch) | |
tree | 6b56aec4347b44080cdbf1ecf16468b47d9d593a | |
parent | 1c2b44a90b8e6ae3ffbea6a0707798c1f4540236 (diff) | |
download | lilv-d4092e2936524c4cf003b6ef8d90d6b9a28b8ba5.tar.gz lilv-d4092e2936524c4cf003b6ef8d90d6b9a28b8ba5.tar.bz2 lilv-d4092e2936524c4cf003b6ef8d90d6b9a28b8ba5.zip |
Modernize compiler version checks
Avoids a warning on compilers where __GNUC__ is not defined.
-rw-r--r-- | lilv/lilvmm.hpp | 4 | ||||
-rw-r--r-- | test/test_value.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp index 5a044b6..cf719dd 100644 --- a/lilv/lilvmm.hpp +++ b/lilv/lilvmm.hpp @@ -24,7 +24,7 @@ namespace Lilv { #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" -#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#elif defined(__GNUC__) && __GNUC__ > 4 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif @@ -37,7 +37,7 @@ uri_to_path(const char* uri) { #if defined(__clang__) # pragma clang diagnostic pop -#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#elif defined(__GNUC__) && __GNUC__ > 4 # pragma GCC diagnostic pop #endif diff --git a/test/test_value.c b/test/test_value.c index ce95166..fc470e1 100644 --- a/test/test_value.c +++ b/test/test_value.c @@ -72,7 +72,7 @@ main(void) #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" -#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#elif defined(__GNUC__) && __GNUC__ > 4 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif @@ -81,7 +81,7 @@ main(void) #if defined(__clang__) # pragma clang diagnostic pop -#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#elif defined(__GNUC__) && __GNUC__ > 4 # pragma GCC diagnostic pop #endif |