]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: fix shellcheck warning in update-freebsd.sh
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 28 Apr 2020 18:29:39 +0000 (14:29 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 28 Apr 2020 18:29:39 +0000 (14:29 -0400)
shellcheck reports:

    In update-freebsd.sh line 72:
    }' $1 >> freebsd.xml.tmp
       ^-- SC2086: Double quote to prevent globbing and word splitting.

    Did you mean:
    }' "$1" >> freebsd.xml.tmp

    For more information:
      https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

Add double quotes to fix it.

gdb/ChangeLog:

* syscalls/update-freebsd.sh: Add double quotes.

gdb/ChangeLog
gdb/syscalls/update-freebsd.sh

index bd2c9b030ab4cecde7cc201b9b5c752db51a5bd0..81983103ac2a234a3c9f0360a0d73c6dfdbc7097 100644 (file)
@@ -1,3 +1,7 @@
+2020-04-28  Simon Marchi  <simon.marchi@efficios.com>
+
+       * syscalls/update-freebsd.sh: Add double quotes.
+
 2020-04-28  Tom Tromey  <tom@tromey.com>
 
        * NEWS: Update.
index 7b177f3115110605d06b955cacf674c069963f99..5d9602641b41047d9db43599f9f3bb3cc06c71c6 100755 (executable)
@@ -69,7 +69,7 @@ awk '
 }
 /\/\* [0-9]* is freebsd[0-9]* [a-z_]* \*\// {
     printf "  <syscall name=\"%s_%s\" number=\"%s\" alias=\"%s\"/>\n", $4, $5, $2, $5
-}' $1 >> freebsd.xml.tmp
+}' "$1" >> freebsd.xml.tmp
 
 cat >> freebsd.xml.tmp <<EOF
 </syscalls_info>