tools/test-runner: Fix errors reported by scan-build
authorTedd Ho-Jeong An <tedd.an@intel.com>
Fri, 1 Jul 2022 00:43:52 +0000 (17:43 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit773c329144446640104cd63a97c3d0ba93d8fcdd
tree7aeacfedb294f4a5ab895bb7be6824791eba3677
parent3cc453c338288117dd33b42136ccf5d0f1072c1e
tools/test-runner: Fix errors reported by scan-build

This patch fixes the errors reported by the scan-build.

tools/test-runner.c:315:2: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
        execve(argv[0], argv, qemu_envp);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tools/test-runner.c:554:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
        if (chdir(home + 5) < 0) {
            ^~~~~~~~~~~~~~~

tools/test-runner.c:638:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
        if (chdir(home + 5) < 0) {
            ^~~~~~~~~~~~~~~

tools/test-runner.c:695:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
        if (chdir(home + 5) < 0) {
            ^~~~~~~~~~~~~~~

tools/test-runner.c:984:3: warning: Value stored to 'serial_fd' is never
read [deadcode.DeadStores]
                serial_fd = -1;
                ^           ~~

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/test-runner.c