commit 940d80b09521554254a221707443a318b045da8f
parent 72b06869876af04b7711a0c15c5dad90d8df8d07
Author: Paul Walker <paul@pwjw.com>
Date: Fri, 23 Dec 2022 16:13:30 -0500
Add bounding parnens on macro arguments
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/clap/version.h b/include/clap/version.h
@@ -27,10 +27,10 @@ typedef struct clap_version {
#define CLAP_VERSION_INIT \
{ (uint32_t)CLAP_VERSION_MAJOR, (uint32_t)CLAP_VERSION_MINOR, (uint32_t)CLAP_VERSION_REVISION }
-#define CLAP_VERSION_LT(maj,min,rev) ((maj < CLAP_VERSION_MAJOR) || \
- (maj == CLAP_VERSION_MAJOR && min < CLAP_VERSION_MINOR ) || \
- (maj == CLAP_VERSION_MAJOR && min == CLAP_VERSION_MINOR && rev < CLAP_VERSION_REVISION))
-#define CLAP_VERSION_EQ(maj,min,rev) ((maj == CLAP_VERSION_MAJOR) && (min == CLAP_VERSION_MINOR) && (rev == CLAP_VERSION_REVISION))
+#define CLAP_VERSION_LT(maj,min,rev) (((maj) < CLAP_VERSION_MAJOR) || \
+ ((maj) == CLAP_VERSION_MAJOR && (min) < CLAP_VERSION_MINOR ) || \
+ ((maj) == CLAP_VERSION_MAJOR && (min) == CLAP_VERSION_MINOR && (rev) < CLAP_VERSION_REVISION))
+#define CLAP_VERSION_EQ(maj,min,rev) (((maj) == CLAP_VERSION_MAJOR) && ((min) == CLAP_VERSION_MINOR) && ((rev) == CLAP_VERSION_REVISION))
#define CLAP_VERSION_GE(maj,min,rev) (!CLAP_VERSION_LT(maj,min,rev))
static const CLAP_CONSTEXPR clap_version_t CLAP_VERSION = CLAP_VERSION_INIT;