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@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10133>
This commit is contained in:
Lionel Landwerlin 2021-04-09 14:58:19 +03:00
parent 0a3bfacabb
commit ec6d9b7fb2

View file

@ -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__)