Fixed findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/usr/bin/gpgrt-config:250:18: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  248|   
#  249|   arg1_is_same () {
#  250|->     [ "$1" = "=" -o "$1" = ">=" -o "$1" = "<=" ]
#  251|   }
#  252|   

Error: SHELLCHECK_WARNING (CWE-477): [#def2]
/usr/bin/gpgrt-config:250:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  248|   
#  249|   arg1_is_same () {
#  250|->     [ "$1" = "=" -o "$1" = ">=" -o "$1" = "<=" ]
#  251|   }
#  252|   

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/gpgrt-config:254:19: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  252|   
#  253|   arg1_is_less () {
#  254|->     [ "$1" = "!=" -o "$1" = "<" -o "$1" = "<=" ]
#  255|   }
#  256|   

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/gpgrt-config:254:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  252|   
#  253|   arg1_is_less () {
#  254|->     [ "$1" = "!=" -o "$1" = "<" -o "$1" = "<=" ]
#  255|   }
#  256|   

Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/bin/gpgrt-config:258:19: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  256|   
#  257|   arg1_is_great () {
#  258|->     [ "$1" = "!=" -o "$1" = ">" -o "$1" = ">=" ]
#  259|   }
#  260|   

Error: SHELLCHECK_WARNING (CWE-477): [#def6]
/usr/bin/gpgrt-config:258:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  256|   
#  257|   arg1_is_great () {
#  258|->     [ "$1" = "!=" -o "$1" = ">" -o "$1" = ">=" ]
#  259|   }
#  260|   

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/usr/bin/gpgrt-config:273:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  271|       ___chunk2=""
#  272|   
#  273|->     while [ -n "$___str1" -a -n "$___str2" ]; do
#  274|   	# Trim anything that's not alnum or tilde from the front
#  275|   	___str1="$(expr "$___str1" : '[^0-9A-Za-z~]*\(.*\)')"

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/bin/gpgrt-config:282:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  280|   	___char2=${___str2%${___str2#?}}
#  281|   
#  282|-> 	if [ "$___char1" = ~ -o "$___char2" = ~ ]; then
#  283|   	    if [ "$___char1" != ~ ]; then
#  284|   		arg1_is_great $___cmp

Error: SHELLCHECK_WARNING (CWE-477): [#def9]
/usr/bin/gpgrt-config:296:22: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  294|   	fi
#  295|   
#  296|-> 	if [ -z "$___char1" -o -z "$___char2" ]; then
#  297|   	    break
#  298|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def10]
/usr/bin/gpgrt-config:694:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  692|   done
#  693|   
#  694|-> if [ -z "$want_var" -a -z "$want_attr" ]; then
#  695|       if [ -n "$want_cflags" ]; then
#  696|   	output="$output${output:+ }$(sysroot -I $(list_only_once $cflags))"

Error: SHELLCHECK_WARNING (CWE-477): [#def11]
/usr/bin/gpgrt-config:698:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  696|   	output="$output${output:+ }$(sysroot -I $(list_only_once $cflags))"
#  697|   	# Backward compatibility to old gpg-error-config
#  698|-> 	if [ $mt = yes -a -n "$mtcflags" ]; then
#  699|   	    output="$output${output:+ }$mtcflags"
#  700|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def12]
/usr/bin/gpgrt-config:705:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  703|   	output="$output${output:+ }$(sysroot -L $(list_only_once_for_libs $libs))"
#  704|   	# Backward compatibility to old gpg-error-config
#  705|-> 	if [ $mt = yes -a -n "$mtlibs" ]; then
#  706|   	    output="$output${output:+ }$mtlibs"
#  707|   	fi

Error: GCC_ANALYZER_WARNING (CWE-404): [#def13]
libgpg-error-1.55/src/visibility.c:1329:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgpg-error-1.55/src/visibility.c:1328:3: acquire_resource: 'va_start' called here
libgpg-error-1.55/src/visibility.c:1329:12: throw: if '_gpgrt_vfnameconcat' throws an exception...
libgpg-error-1.55/src/visibility.c:1329:12: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
# 1327|   
# 1328|     va_start (arg_ptr, first);
# 1329|->   result = _gpgrt_vfnameconcat (0, first, arg_ptr);
# 1330|     va_end (arg_ptr);
# 1331|     return result;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def14]
libgpg-error-1.55/src/visibility.c:1341:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libgpg-error-1.55/src/visibility.c:1340:3: acquire_resource: 'va_start' called here
libgpg-error-1.55/src/visibility.c:1341:12: throw: if '_gpgrt_vfnameconcat' throws an exception...
libgpg-error-1.55/src/visibility.c:1341:12: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0)
# 1339|   
# 1340|     va_start (arg_ptr, first);
# 1341|->   result = _gpgrt_vfnameconcat (1, first, arg_ptr);
# 1342|     va_end (arg_ptr);
# 1343|     return result;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-32.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibgpg-error-1.58-1.fc44
diffbase-store-results-to/tmp/tmp2haxgqvf/libgpg-error-1.58-1.fc44.tar.xz
diffbase-time-created2026-01-08 18:46:04
diffbase-time-finished2026-01-08 18:48:21
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp2haxgqvf/libgpg-error-1.58-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp2haxgqvf/libgpg-error-1.58-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-32.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibgpg-error-1.55-2.fc43
store-results-to/tmp/tmpcij3boxx/libgpg-error-1.55-2.fc43.tar.xz
time-created2026-01-08 18:43:00
time-finished2026-01-08 18:45:44
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpcij3boxx/libgpg-error-1.55-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcij3boxx/libgpg-error-1.55-2.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9