AUR AI Reviewer

Review Results

Version #3251 of argagg · commit 726f2f4d6199 · status Reviewed

Risk 0/5 · Safe 0001-gcc-werror.patch
Result #7026

Comment

The patch only relaxes a compiler warning for the test target when using GCC: it adds -Wno-error=array-bounds to argagg_test, with a comment referencing an upstream issue. This does not affect installed package artifacts, does not introduce network access, privilege changes, persistence, or suspicious build-time execution. The change is limited to test compilation behavior and is a reasonable workaround for a known false positive.

@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 558cf34..4371969 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -146,6 +146,10 @@ if( ARGAGG_BUILD_TESTS )
+       COMPILE_FLAGS "${ARGAGG_TEST_COMPILE_FLAGS}"
+       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+   )
++  if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
++    # GCC false positive, see https://github.com/vietjtnguyen/argagg/issues/46
++    target_compile_options( argagg_test PRIVATE -Wno-error=array-bounds )
++  endif()
+   add_test(
+     NAME argagg_test
+     COMMAND argagg_test
Risk 0/5 · Safe PKGBUILD
Result #7027

Comment

Low-risk packaging change. The added source is a local patch fetched via the PKGBUILD source array and verified by sha512, so there is no new untrusted network fetch or build-time download. The patch only relaxes a GCC warning-as-error setting for the test target (`-Wno-error=array-bounds`) and does not introduce install-time execution, privilege escalation, persistence, or changes to package contents. `options=('!lto')` is a build flag adjustment and not inherently suspicious here. Overall this looks like a benign compatibility fix.

@@ -9,10 +9,21 @@ arch=('any')
 url='https://github.com/vietjtnguyen/argagg'
 license=('MIT')
 makedepends=('cmake' 'doxygen')
+options=('!lto')
 provides=('argagg')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
-sha512sums=('85634bff33236ffcb0aea03a6fa4b3529b6d1faa03f8e030f3c5401fc453bb5e1964f7d0644e4f3fc089ccd7751ea94c466e02b85f7c9701ce21adcc20c0b058')
+source=(
+        "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
+        "0001-gcc-werror.patch"
+)
+sha512sums=(
+        '85634bff33236ffcb0aea03a6fa4b3529b6d1faa03f8e030f3c5401fc453bb5e1964f7d0644e4f3fc089ccd7751ea94c466e02b85f7c9701ce21adcc20c0b058'
+        '50c877ac9a9e94896f6fa424470a13b9a4678dfe2959d8ff71a7694128b33def56cc806efc3ad0f6955712a78061608eae5c5669d772ddaceac195fa08e54483'
+)
 
+prepare() {
+    cd "$pkgname-$pkgver"
+    patch -Np1 -i ../0001-gcc-werror.patch  
+}
 
 build() {
   cmake -B build -S "$pkgname-$pkgver" \