Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings
@ 2023-03-17 20:27 Julien Olivain
  2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Julien Olivain @ 2023-03-17 20:27 UTC (permalink / raw)
  To: buildroot
  Cc: Bernd Kuhls, Marcus Folkesson, Julien Olivain, Yann E . MORIN,
	Pascal de Bruijn

When running "make check-package" on a system with shellcheck 0.9.0,
the command fails with output:

    make check-package
    package/kodi/br-kodi:0: run 'shellcheck' and fix the warnings
    ...
    3 warnings generated

This commit fixes the warnings reported by the command:

    shellcheck package/kodi/br-kodi

Fixes:

    In package/kodi/br-kodi line 11:
        LOOP=0
        ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).

    In package/kodi/br-kodi line 12:
        killall "${KODI##*/}"
        ^-------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).

    In package/kodi/br-kodi line 36:
    exit ${ret}
         ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/kodi/br-kodi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kodi/br-kodi b/package/kodi/br-kodi
index 83d4d4e5ac..bc64515246 100755
--- a/package/kodi/br-kodi
+++ b/package/kodi/br-kodi
@@ -7,6 +7,7 @@ shift
 
 # In case someone asked we terminate, just kill
 # the Kodi process
+# shellcheck disable=SC2317  # Don't warn about unreachable commands
 trap_kill() {
     LOOP=0
     killall "${KODI##*/}"
@@ -33,4 +34,4 @@ while [ ${LOOP} -eq 1 ]; do
             ;;
     esac
 done
-exit ${ret}
+exit "${ret}"
-- 
2.40.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-18 22:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 20:27 [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
2023-03-18 22:05   ` Thomas Petazzoni via buildroot
2023-03-17 20:27 ` [Buildroot] [PATCH 3/3] utils/config: " Julien Olivain
2023-03-18 22:03 ` [Buildroot] [PATCH 1/3] package/kodi/br-kodi: " Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox