Quoting Eric Engestrom (2018-09-24 09:44:37)
> Signed-off-by: Eric Engestrom <eric.engest...@intel.com>
> ---
> v2: Use the util_* wrapper to make sure MSVC stays happy (Dylan)
> ---
>  src/gallium/auxiliary/gallivm/lp_bld_printf.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c 
> b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> index 575ebdfdf65b7fd43b94..53c4d3cde41e4677abdb 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> @@ -108,9 +108,7 @@ lp_build_print_value(struct gallivm_state *gallivm,
>        type_fmt[5] = '\0';
>     } else if (type_kind == LLVMIntegerTypeKind) {
>        if (LLVMGetIntTypeWidth(type_ref) == 64) {
> -         unsigned flen = strlen(PRId64);
> -         assert(flen <= 3);
> -         strncpy(type_fmt + 2, PRId64, flen);
> +         util_snprintf(type_fmt + 2, 3, "%s", PRId64);
>        } else if (LLVMGetIntTypeWidth(type_ref) == 8) {
>           type_fmt[2] = 'u';
>        } else {
> -- 
> Cheers,
>   Eric
> 

Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to