Task #119191 - fixed.err

back to task #119191
download
Error: SHELLCHECK_WARNING:
/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="$(run_virsh_c "$uri" list --uuid $persistent)"
#  110|   
#  111|       if [ $? -ne 0 ]; then

Error: SHELLCHECK_WARNING (CWE-571):
/usr/libexec/libvirt-guests.sh:109:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  107|       local uri="$1"
#  108|       local persistent="$2"
#  109|->     local list="$(run_virsh_c "$uri" list --uuid $persistent)"
#  110|   
#  111|       if [ $? -ne 0 ]; then

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

Error: SHELLCHECK_WARNING (CWE-571):
/usr/libexec/libvirt-guests.sh:134:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  132|       local uri="$1"
#  133|       local uuid="$2"
#  134|->     local id="$(run_virsh "$uri" domid "$uuid")"
#  135|   
#  136|       guest_running="false"

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

Error: SHELLCHECK_WARNING (CWE-571):
/usr/libexec/libvirt-guests.sh:485:15: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  483|           eval_gettext "Running guests on \$uri URI: "
#  484|   
#  485|->         local list="$(list_guests "$uri")"
#  486|           if [ $? -eq 0 ]; then
#  487|               local empty=true

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

Error: SHELLCHECK_WARNING (CWE-571):
/usr/libexec/libvirt-guests.sh:501:19: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  499|   
#  500|           if "$persistent_only"; then
#  501|->             local transient="$(list_guests "$uri" "--transient")"
#  502|               if [ $? -eq 0 ]; then
#  503|                   local empty="true"

Error: GCC_ANALYZER_WARNING (CWE-457):
libvirt-12.0.0/src/hyperv/hyperv_driver.c:928:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ideChannels[ctrlr_idx]’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2900:1: enter_function: entry to ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2903:33: call_function: calling ‘hypervConnectGetHostname’ from ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2903:33: return_function: returning to ‘hypervDomainDefineXML’ from ‘hypervConnectGetHostname’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2914:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2918:50: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2918:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2929:14: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2933:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2936:25: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2938:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2941:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2941:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2946:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2946:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:45: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:14: call_function: calling ‘hypervDomainLookupByName’ from ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:14: return_function: returning to ‘hypervDomainDefineXML’ from ‘hypervDomainLookupByName’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2953:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2957:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2957:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2961:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2961:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2965:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2965:9: call_function: calling ‘hypervDomainAttachStorage’ from ‘hypervDomainDefineXML’
#  926|           case VIR_DOMAIN_DISK_BUS_IDE:
#  927|               ctrlr_idx = def->disks[i]->info.addr.drive.bus;
#  928|->             if (hypervDomainAttachStorageVolume(domain, def->disks[i],
#  929|                                                   ideChannels[ctrlr_idx], hostname) < 0) {
#  930|                   return -1;

Error: GCC_ANALYZER_WARNING (CWE-457):
libvirt-12.0.0/src/hyperv/hyperv_driver.c:935:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘scsiControllers[ctrlr_idx]’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2900:1: enter_function: entry to ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2903:33: call_function: calling ‘hypervConnectGetHostname’ from ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2903:33: return_function: returning to ‘hypervDomainDefineXML’ from ‘hypervConnectGetHostname’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2914:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2918:50: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2918:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2929:14: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2933:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2936:25: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2938:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2941:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2941:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2946:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2946:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:45: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:14: call_function: calling ‘hypervDomainLookupByName’ from ‘hypervDomainDefineXML’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2950:14: return_function: returning to ‘hypervDomainDefineXML’ from ‘hypervDomainLookupByName’
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2953:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2957:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2957:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2961:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2961:8: branch_false: following ‘false’ branch...
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2965:9: branch_false: ...to here
libvirt-12.0.0/src/hyperv/hyperv_driver.c:2965:9: call_function: calling ‘hypervDomainAttachStorage’ from ‘hypervDomainDefineXML’
#  933|           case VIR_DOMAIN_DISK_BUS_SCSI:
#  934|               ctrlr_idx = def->disks[i]->info.addr.drive.controller;
#  935|->             if (hypervDomainAttachStorageVolume(domain, def->disks[i],
#  936|                                                   scsiControllers[ctrlr_idx], hostname) < 0) {
#  937|                   return -1;