diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-04-29 20:35:35 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-04-29 20:35:35 -0400 |
commit | 1207375d768ae2b901c3bea6543b610c461160dd (patch) | |
tree | 991dfa144424ce31efa350615e048929478f1f65 /gas/ChangeLog | |
parent | 9fdb2916fec2833fd5c359c35916d2e632a06c23 (diff) | |
download | binutils-gdb-1207375d768ae2b901c3bea6543b610c461160dd.tar.gz |
gdb: fix shellcheck warnings SC2154 (referenced but not assigned) in gdbarch.sh
Fix all instances of this kind of warning:
In gdbarch.sh line 96:
m ) staticdefault="${predefault}" ;;
^-----------^ SC2154: predefault is referenced but not assigned.
These warnings appear because we are doing something a bit funky when reading
the gdbarch fields. These variables are not assigned explicitly, but
using some `eval` commands.
I don't think there is so much we can fix about those warnings. To
silence them, I've changed `${foo}` to `${foo:-}`. This tells the shell
to substitute with an empty string if `foo` is not defined. This
retains the current behavior, but the warnings go away.
gdb/ChangeLog:
* gdbarch.sh: Use ${foo:-} where shellcheck would report a
"referenced but not assigned" warning.
Diffstat (limited to 'gas/ChangeLog')
0 files changed, 0 insertions, 0 deletions