Module: Mesa Branch: master Commit: ec6d9b7fb27d2039f75ef26c143070194d1caad7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec6d9b7fb27d2039f75ef26c143070194d1caad7
Author: Lionel Landwerlin <lionel.g.landwer...@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.landwer...@intel.com> Reviewed-by: Jesse Natalie <jenat...@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__) _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit