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 | 9fdb2916fec2833fd5c359c35916d2e632a06c23 (patch) | |
tree | c55aa5e6ef7ba39c9f64e957e7f7fd269c1c61d5 /gdb | |
parent | 759cea5e3f7f141abfc2f31d5039cd7f109edf95 (diff) | |
download | fsf-binutils-gdb-9fdb2916fec2833fd5c359c35916d2e632a06c23.zip fsf-binutils-gdb-9fdb2916fec2833fd5c359c35916d2e632a06c23.tar.gz fsf-binutils-gdb-9fdb2916fec2833fd5c359c35916d2e632a06c23.tar.bz2 |
gdb: fix shellcheck warnings SC2034 (unused variable) in gdbarch.sh
shellcheck reports:
In gdbarch.sh line 139:
fallbackdefault="0"
^-------------^ SC2034: fallbackdefault appears unused. Verify use (or export if used externally).
Indeed, the `fallbackdefault` variable appears to be unused, remove the
code that sets it.
gdb/ChangeLog:
* gdbarch.sh: Remove code that sets fallbackdefault.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 21 |
2 files changed, 6 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bf0fdf5..dee9a6e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-04-29 Simon Marchi <simon.marchi@efficios.com> + * gdbarch.sh: Remove code that sets fallbackdefault. + +2020-04-29 Simon Marchi <simon.marchi@efficios.com> + * gdbarch.sh: Use shell operators && and || instead of -a and -o. diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index f1b9276..4e4cc82 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -122,23 +122,6 @@ EOF esac esac - # PREDEFAULT is a valid fallback definition of MEMBER when - # multi-arch is not enabled. This ensures that the - # default value, when multi-arch is the same as the - # default value when not multi-arch. POSTDEFAULT is - # always a valid definition of MEMBER as this again - # ensures consistency. - - if [ -n "${postdefault}" ] - then - fallbackdefault="${postdefault}" - elif [ -n "${predefault}" ] - then - fallbackdefault="${predefault}" - else - fallbackdefault="0" - fi - #NOT YET: See gdbarch.log for basic verification of # database @@ -156,8 +139,8 @@ EOF fallback_default_p () { - ( [ -n "${postdefault}" ] && [ "x${invalid_p}" != "x0" ] ) \ - || ( [ -n "${predefault}" ] && [ "x${invalid_p}" = "x0" ] ) + { [ -n "${postdefault}" ] && [ "x${invalid_p}" != "x0" ]; } \ + || { [ -n "${predefault}" ] && [ "x${invalid_p}" = "x0" ]; } } class_is_variable_p () |