From fe720d8e47b7311a032cee541bc141fa9f2d7bc2 Mon Sep 17 00:00:00 2001 From: Grzegorz Lukasik Date: Wed, 19 Aug 2020 04:47:12 -0700 Subject: [PATCH] Silence "may be used uninitialized" warnings Possibly can be fixed upstream: ``` INFO: From Compiling third_party/zstd-jni/src/main/native/jni_zdict.c: third_party/zstd-jni/src/main/native/jni_zdict.c: In function 'Java_com_github_luben_zstd_Zstd_trainFromBuffer': third_party/zstd-jni/src/main/native/jni_zdict.c:55:12: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] E1: return size; ^ third_party/zstd-jni/src/main/native/jni_zdict.c: In function 'Java_com_github_luben_zstd_Zstd_trainFromBufferDirect': third_party/zstd-jni/src/main/native/jni_zdict.c:89:12: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] E1: return size; ^ ``` --- third_party/zstd-jni/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/zstd-jni/BUILD.bazel b/third_party/zstd-jni/BUILD.bazel index 8beaf6ee89bcf3..3757a67e8a5b42 100644 --- a/third_party/zstd-jni/BUILD.bazel +++ b/third_party/zstd-jni/BUILD.bazel @@ -61,6 +61,7 @@ cc_binary( "-Wstrict-prototypes", "-Wno-unused-variable", "-Wpointer-arith", + "-Wno-maybe-uninitialized", ], includes = [ "src/main/native",