Mesa (master): microsoft: Fix comma in variadic macro for MSVC
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 29 05:52:26 UTC 2021
Module: Mesa
Branch: master
Commit: bef0af3f216303b7611f13f66392cd3f35c1f175
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bef0af3f216303b7611f13f66392cd3f35c1f175
Author: James Park <jpark37 at lagfreegames.com>
Date: Thu Jan 28 08:37:12 2021 -0800
microsoft: Fix comma in variadic macro for MSVC
New preprocessor seems to be enabled by default when C17 mode is active.
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8772>
---
src/microsoft/clc/clc_helpers.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/microsoft/clc/clc_helpers.h b/src/microsoft/clc/clc_helpers.h
index 48f8c2df373..07e44df289f 100644
--- a/src/microsoft/clc/clc_helpers.h
+++ b/src/microsoft/clc/clc_helpers.h
@@ -65,14 +65,14 @@ clc_free_spirv_binary(struct spirv_binary *spvbin);
#define clc_log(logger, level, fmt, ...) do { \
if (!logger || !logger->level) break; \
char *msg = NULL; \
- asprintf(&msg, fmt, __VA_ARGS__); \
+ asprintf(&msg, fmt, ##__VA_ARGS__); \
assert(msg); \
logger->level(logger->priv, msg); \
free(msg); \
} while (0)
-#define clc_error(logger, fmt, ...) clc_log(logger, error, fmt, __VA_ARGS__)
-#define clc_warning(logger, fmt, ...) clc_log(logger, warning, fmt, __VA_ARGS__)
+#define clc_error(logger, fmt, ...) clc_log(logger, error, fmt, ##__VA_ARGS__)
+#define clc_warning(logger, fmt, ...) clc_log(logger, warning, fmt, ##__VA_ARGS__)
#ifdef __cplusplus
}
More information about the mesa-commit
mailing list