Fixed findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/share/lvm2-testsuite/shell/pvcreate-operation.sh:32:13: warning[SC2154]: dev1 is referenced but not assigned.
#   30|   # pvcreate (lvm$mdatype) refuses to overwrite an mounted filesystem (bz168330)
#   31|   	test ! -d mnt && mkdir mnt
#   32|-> 	if mke2fs "$dev1"; then
#   33|   		mount "$dev1" mnt
#   34|   		not pvcreate -M$mdatype "$dev1" 2>err

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/share/lvm2-testsuite/shell/vgimportclone.sh:19:44: warning[SC2154]: dev1 is referenced but not assigned.
#   17|   aux prepare_devs 3
#   18|   
#   19|-> vgcreate $SHARED --metadatasize 128k $vg1 "$dev1"
#   20|   lvcreate -l100%FREE -n $lv1 $vg1
#   21|   

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/share/lvm2-testsuite/shell/vgimportclone.sh:20:24: warning[SC2154]: lv1 is referenced but not assigned.
#   18|   
#   19|   vgcreate $SHARED --metadatasize 128k $vg1 "$dev1"
#   20|-> lvcreate -l100%FREE -n $lv1 $vg1
#   21|   
#   22|   # Test plain vgexport vgimport tools

Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/share/lvm2-testsuite/shell/vgimportclone.sh:28:21: warning[SC2154]: vg is referenced but not assigned.
#   26|   invalid vgimport
#   27|   # Cannot combine -a and VG name
#   28|-> invalid vgexport -a $vg
#   29|   invalid vgimport -a $vg1
#   30|   # Cannot export unknonw VG

Error: SHELLCHECK_WARNING (CWE-457): [#def5]
/usr/share/lvm2-testsuite/shell/vgimportclone.sh:51:23: warning[SC2154]: dev2 is referenced but not assigned.
#   49|   # from df, then add it again after the dd.
#   50|   if lvmdevices; then
#   51|-> 	lvmdevices --deldev "$dev2"
#   52|   fi
#   53|   

Error: SHELLCHECK_WARNING (CWE-457): [#def6]
/usr/share/lvm2-testsuite/shell/vgimportclone.sh:76:28: warning[SC2154]: vg2 is referenced but not assigned.
#   74|   
#   75|   # Import the cloned PV to a new VG
#   76|-> vgimportclone --basevgname $vg2 "$dev2"
#   77|   
#   78|   lvmdevices || true

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
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-39.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namelvm2-2.03.27-1.fc42
diffbase-store-results-to/tmp/tmpqnw_0fh5/lvm2-2.03.27-1.fc42.tar.xz
diffbase-time-created2024-11-13 01:59:17
diffbase-time-finished2024-11-13 02:04:01
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpqnw_0fh5/lvm2-2.03.27-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpqnw_0fh5/lvm2-2.03.27-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-39.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelvm2-2.03.25-4.fc41
store-results-to/tmp/tmptingh24i/lvm2-2.03.25-4.fc41.tar.xz
time-created2024-11-13 01:53:49
time-finished2024-11-13 01:58:51
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmptingh24i/lvm2-2.03.25-4.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmptingh24i/lvm2-2.03.25-4.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9