diff options
author | José Fonseca <[email protected]> | 2013-07-02 06:41:32 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2013-07-02 06:41:32 +0100 |
commit | 4c859901cebf04b37d8d458d58fc5ac0e24b4471 (patch) | |
tree | 1877bd5c910ab1ba6544571a75c46c20a4e26aa8 /src/gallium | |
parent | e621ec816da65a56c3ba038a85075000bf5882d2 (diff) |
gallivm: Fix MSVC build.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c index 43f266086e8..124381d87e4 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c @@ -62,9 +62,8 @@ build_binary_int_overflow(struct gallivm_state *gallivm, LLVMValueRef b, LLVMValueRef *ofbit) { - static const int MAX_INTR_STR = 256; LLVMBuilderRef builder = gallivm->builder; - char intr_str[MAX_INTR_STR]; + char intr_str[256]; LLVMTypeRef type_ref; LLVMTypeKind type_kind; LLVMTypeRef oelems[2] = { @@ -82,18 +81,18 @@ build_binary_int_overflow(struct gallivm_state *gallivm, switch (LLVMGetIntTypeWidth(type_ref)) { case 16: - snprintf(intr_str, MAX_INTR_STR - 1, "%s.i16", - intr_prefix); + util_snprintf(intr_str, sizeof intr_str, "%s.i16", + intr_prefix); oelems[0] = LLVMInt16TypeInContext(gallivm->context); break; case 32: - snprintf(intr_str, MAX_INTR_STR - 1, "%s.i32", - intr_prefix); + util_snprintf(intr_str, sizeof intr_str, "%s.i32", + intr_prefix); oelems[0] = LLVMInt32TypeInContext(gallivm->context); break; case 64: - snprintf(intr_str, MAX_INTR_STR - 1, "%s.i64", - intr_prefix); + util_snprintf(intr_str, sizeof intr_str, "%s.i64", + intr_prefix); oelems[0] = LLVMInt64TypeInContext(gallivm->context); break; default: |