Mesa (master): microsoft: fixup clc_log() define
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 9 12:41:34 UTC 2021
Module: Mesa
Branch: master
Commit: ec6d9b7fb27d2039f75ef26c143070194d1caad7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec6d9b7fb27d2039f75ef26c143070194d1caad7
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Fri Apr 9 14:58:19 2021 +0300
microsoft: fixup clc_log() define
The local msg variable shadows one of the argument of
SPIRVMessageConsumer making the error message "(null)".
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10133>
---
src/microsoft/clc/clc_helpers.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/microsoft/clc/clc_helpers.h b/src/microsoft/clc/clc_helpers.h
index 07e44df289f..653e99a8a27 100644
--- a/src/microsoft/clc/clc_helpers.h
+++ b/src/microsoft/clc/clc_helpers.h
@@ -64,11 +64,11 @@ 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__); \
- assert(msg); \
- logger->level(logger->priv, msg); \
- free(msg); \
+ char *_msg = NULL; \
+ 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__)
More information about the mesa-commit
mailing list