Fixed findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/share/lvm2-testsuite/shell/thin-flags.sh:35:17: warning[SC2154]: lv2 is referenced but not assigned.
#   33|   
#   34|   lvcreate -T -L1M --errorwhenfull y $vg/pool
#   35|-> lvcreate -V2 -n $lv2 $vg/pool
#   36|   
#   37|   aux error_dev  "$dev2" 2054:2

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/share/lvm2-testsuite/shell/thin-flags.sh:37:17: warning[SC2154]: dev2 is referenced but not assigned.
#   35|   lvcreate -V2 -n $lv2 $vg/pool
#   36|   
#   37|-> aux error_dev  "$dev2" 2054:2
#   38|   # Check our 'lvs' is not flushing pool - should be still OK
#   39|   check lv_attr_bit health $vg/pool "-"

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/share/lvm2-testsuite/shell/thin-flags.sh:70:17: warning[SC2154]: lv1 is referenced but not assigned.
#   68|   
#   69|   # Prepare some fake metadata prefilled to ~100%
#   70|-> lvcreate -L2 -n $lv1 $vg "$dev2" # tmp for metadata
#   71|   
#   72|   VOLS=490

Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/share/lvm2-testsuite/shell/thin-flags.sh:100:22: warning[SC2154]: lv3 is referenced but not assigned.
#   98|   
#   99|   not lvcreate -s $vg/$lv2
#  100|-> not lvcreate -V10 -n $lv3 $vg/pool
#  101|   
#  102|   lvs -ao+seg_pe_ranges $vg

Error: GCC_ANALYZER_WARNING (CWE-590): [#def5]
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:566:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘""’ which points to memory not on the heap
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5855:12: enter_function: entry to ‘_stats_report’
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5890:12: branch_false: following ‘false’ branch...
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5893:14: branch_false: ...to here
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5893:12: branch_false: following ‘false’ branch...
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5896:13: branch_false: ...to here
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5899:12: branch_false: following ‘false’ branch...
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5902:13: branch_false: ...to here
LVM2.2.03.30/libdm/dm-tools/dmsetup.c:5902:13: call_function: calling ‘_display_info’ from ‘_stats_report’
#  564|   	 */
#  565|   	if (!strcmp(split_name->subsystem, "LVM"))
#  566|-> 		free(split_name->vg_name);
#  567|   
#  568|   	free(split_name->subsystem);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-173.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.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelvm2-2.03.31-1.fc43
diffbase-store-results-to/tmp/tmp1z0w8fkl/lvm2-2.03.31-1.fc43.tar.xz
diffbase-time-created2025-04-25 14:23:20
diffbase-time-finished2025-04-25 14:27:22
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp1z0w8fkl/lvm2-2.03.31-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp1z0w8fkl/lvm2-2.03.31-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-173.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelvm2-2.03.30-3.fc42
store-results-to/tmp/tmpleg5x368/lvm2-2.03.30-3.fc42.tar.xz
time-created2025-04-25 14:18:32
time-finished2025-04-25 14:22:57
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpleg5x368/lvm2-2.03.30-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpleg5x368/lvm2-2.03.30-3.fc42.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9