Newly introduced findings

List of Findings

Error: SHELLCHECK_WARNING: [#def1]
/usr/libexec/libvirt-guests.sh:109:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  107|       local uri="$1"
#  108|       local persistent="$2"
#  109|->     local list
#  110|   
#  111|       list="$(run_virsh_c "$uri" list --uuid $persistent)"

Error: SHELLCHECK_WARNING: [#def2]
/usr/libexec/libvirt-guests.sh:135:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  133|       local uri="$1"
#  134|       local uuid="$2"
#  135|->     local id
#  136|   
#  137|       guest_running="false"

Error: SHELLCHECK_WARNING: [#def3]
/usr/libexec/libvirt-guests.sh:487:9: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  485|           eval_gettext "Running guests on \$uri URI: "
#  486|   
#  487|->         local list
#  488|           list="$(list_guests "$uri")"
#  489|           if [ $? -eq 0 ]; then

Error: SHELLCHECK_WARNING: [#def4]
/usr/libexec/libvirt-guests.sh:504:13: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  502|   
#  503|           if "$persistent_only"; then
#  504|->             local transient
#  505|               transient="$(list_guests "$uri" "--transient")"
#  506|               if [ $? -eq 0 ]; then

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4375:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘snapshotsRet’
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4327:5: branch_false: following ‘false’ branch (when ‘__unsuppflags == 0’)...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4332:9: branch_false: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4332:8: branch_false: following ‘false’ branch...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4335:19: branch_false: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4337:8: branch_false: following ‘false’ branch...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4341:10: branch_false: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4350:8: branch_false: following ‘false’ branch (when ‘snaps’ is non-NULL)...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4353:8: branch_false: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4353:8: branch_false: following ‘false’ branch (when ‘count <= 0’)...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4368:5: branch_false: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4368:5: release_memory: ‘snapshotsRet’ is NULL
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4372:8: branch_true: following ‘true’ branch (when ‘ret < 0’)...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4372:8: branch_true: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4374:21: branch_true: following ‘true’ branch...
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4375:29: branch_true: ...to here
libvirt-12.5.0/src/hyperv/hyperv_driver.c:4375:17: danger: dereference of NULL ‘snapshotsRet + i * 8’
# 4373|           size_t i;
# 4374|           for (i = 0; i < count; i++) {
# 4375|->             if (snapshotsRet[i])
# 4376|                   virObjectUnref(snapshotsRet[i]);
# 4377|           }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def6]
libvirt-12.5.0/src/util/virobject.c:330:12: warning[-Wanalyzer-deref-before-check]: check of ‘klass’ for NULL after already dereferencing it
#  328|       PROBE_DEBUG(OBJECT_DISPOSE, "obj=%p classname=%s", gobj, klass->name);
#  329|   
#  330|->     while (klass) {
#  331|           if (klass->dispose)
#  332|               klass->dispose(obj);

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
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-226.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.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibvirt-12.0.0-3.fc44
diffbase-store-results-to/tmp/tmpleui6_ij/libvirt-12.0.0-3.fc44.tar.xz
diffbase-time-created2026-08-03 18:04:12
diffbase-time-finished2026-08-03 18:17:22
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpleui6_ij/libvirt-12.0.0-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpleui6_ij/libvirt-12.0.0-3.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-226.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibvirt-12.5.0-2.fc45
store-results-to/tmp/tmprmvnx5aj/libvirt-12.5.0-2.fc45.tar.xz
time-created2026-08-03 18:17:38
time-finished2026-08-03 18:28:10
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmprmvnx5aj/libvirt-12.5.0-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprmvnx5aj/libvirt-12.5.0-2.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9