Bug 1838233

Summary: address coverity warnings
Product: Red Hat Enterprise Linux 8 Reporter: Micah Abbott <miabbott>
Component: toolboxAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Alex Jia <ajia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: debarshir, jnovy, miabbott, ypu
Target Milestone: rcKeywords: Triaged
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: toolbox-0.0.99-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:32:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Micah Abbott 2020-05-20 17:12:19 UTC
The Coverity scan on `toolbox-0.0.7-1.module+el8.2.1+6441+9a058ad8` raised some warnings that should be addressed.

1. Defect type: SHELLCHECK_WARNING
1. /usr/bin/toolbox:41:11: warning: Declare and assign separately to avoid masking return values. [SC2155]
#    39|       fi
#    40|   
#    41|->     local state=$(container_state)
#    42|       if [[ "$state" == configured ]] || [[ "$state" == exited ]] || [[ "$state" == stopped ]]; then
#    43|           container_start


2. Defect type: SHELLCHECK_WARNING
1. /usr/bin/toolbox:26:11: warning: Declare and assign separately to avoid masking return values. [SC2155]
#    24|       fi
#    25|   
#    26|->     local runlabel=$(image_runlabel)
#    27|       if ! container_exists; then
#    28|           echo "Spawning a container '$TOOLBOX_NAME' with image '$TOOLBOX_IMAGE'"


3. Defect type: SHELLCHECK_WARNING
1. /usr/bin/toolbox:16:16: warning: Can't follow non-constant source. Use a directive to specify location. [SC1090]
#    14|       if [ -f "${TOOLBOXRC}" ]; then
#    15|           echo ".toolboxrc file detected, overriding defaults..."
#    16|->         source "${TOOLBOXRC}"
#    17|       fi
#    18|       TOOLBOX_IMAGE="${REGISTRY}"/"${IMAGE}"

Comment 13 errata-xmlrpc 2021-05-18 15:32:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1796