[Mesa-dev] [PATCH] llvmpipe: init some vars to NULL to silence MinGW compiler warnings

Neha Bhende bhenden at vmware.com
Wed May 1 18:20:50 UTC 2019


LGTM.

Reviewed-by: Neha Bhende <bhenden at vmware.com>

Regards,
Neha

________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: Wednesday, May 1, 2019 9:48 AM
To: mesa-dev at lists.freedesktop.org
Cc: Neha Bhende
Subject: [Mesa-dev] [PATCH] llvmpipe: init some vars to NULL to silence MinGW compiler warnings

---
 src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
index 9561c34..90b2be9 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
@@ -2191,7 +2191,7 @@ lp_build_fetch_s3tc_rgba_aos(struct gallivm_state *gallivm,
       rgba = LLVMGetUndef(i128_vectype);

       for (count = 0; count < n / 4; count++) {
-         LLVMValueRef colors, codewords, alpha_lo, alpha_hi;
+         LLVMValueRef colors, codewords, alpha_lo = NULL, alpha_hi = NULL;

          i4 = lp_build_extract_range(gallivm, i, count * 4, 4);
          j4 = lp_build_extract_range(gallivm, j, count * 4, 4);
@@ -2230,7 +2230,7 @@ lp_build_fetch_s3tc_rgba_aos(struct gallivm_state *gallivm,
       rgba = LLVMBuildBitCast(builder, rgba, i8_vectype, "");
    }
    else {
-      LLVMValueRef colors, codewords, alpha_lo, alpha_hi;
+      LLVMValueRef colors, codewords, alpha_lo = NULL, alpha_hi = NULL;

       lp_build_gather_s3tc(gallivm, n, format_desc, &colors, &codewords,
                            &alpha_lo, &alpha_hi, base_ptr, offset);
--
1.8.5.6

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Cbhenden%40vmware.com%7C7ecdd0d590fb4d22d32408d6ce54f538%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C636923261641738945&sdata=kw%2F%2BkO%2FLSjMh%2FcW8eHicq2VSHJ2wRdpjHsPtWg4rc10%3D&reserved=0


More information about the mesa-dev mailing list