]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Workaround error G6E97C40B
authorDmitry Kurtaev <dmitry.kurtaev@gmail.com>
Wed, 15 Jan 2025 17:28:44 +0000 (20:28 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 19 Jan 2025 15:11:15 +0000 (16:11 +0100)
Warning as an error with GCC from Uubuntu 24.04:
```
/home/runner/work/dotnet_riscv/dotnet_riscv/runtime/src/native/external/zlib-ng/arch/riscv/riscv_features.c(25,33): error G6E97C40B: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] [/home/runner/work/dotnet_riscv/dotnet_riscv/runtime/src/native/libs/build-native.proj]
```

arch/riscv/riscv_features.c

index 62658af70b167028dc643da6210646b541f83c0d..f9957d19ccc56b84dea4578847ed03c0198de491 100644 (file)
@@ -25,7 +25,7 @@ int Z_INTERNAL is_kernel_version_greater_or_equal_to_6_5() {
         return 0;
     }
 
-    if (major > 6 || major == 6 && minor >= 5)
+    if (major > 6 || (major == 6 && minor >= 5))
         return 1;
     return 0;
 }