Mesa (master): amd: Cast to int for %d snprintf argument
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Nov 28 05:32:02 UTC 2020
Module: Mesa
Branch: master
Commit: 31b4fdc00870e8c7c433ca30a05c32a0fe5528ce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31b4fdc00870e8c7c433ca30a05c32a0fe5528ce
Author: James Park <jpark37 at lagfreegames.com>
Date: Thu Nov 26 20:35:36 2020 -0800
amd: Cast to int for %d snprintf argument
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7791>
---
src/amd/llvm/ac_llvm_build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index 9e081f0fd17..b25981e0df9 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -388,7 +388,7 @@ void ac_build_optimization_barrier(struct ac_llvm_context *ctx, LLVMValueRef *pv
LLVMBuilderRef builder = ctx->builder;
char code[16];
- snprintf(code, sizeof(code), "; %d", p_atomic_inc_return(&counter));
+ snprintf(code, sizeof(code), "; %d", (int)p_atomic_inc_return(&counter));
if (!pvgpr) {
LLVMTypeRef ftype = LLVMFunctionType(ctx->voidt, NULL, 0, false);
More information about the mesa-commit
mailing list