diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-24 12:58:14 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-24 13:29:22 +0930 |
commit | f3da8a96ee360c98a94b47835e8f238e61cf5f11 (patch) | |
tree | 3a7efffad7ba13aa9b433ec3737f98e282f8c4d9 /gas | |
parent | 85d14aaeb757550d63254fae5c0415b782e59a29 (diff) | |
download | gdb-f3da8a96ee360c98a94b47835e8f238e61cf5f11.zip gdb-f3da8a96ee360c98a94b47835e8f238e61cf5f11.tar.gz gdb-f3da8a96ee360c98a94b47835e8f238e61cf5f11.tar.bz2 |
gcc-4 -Og false positive "may be used uninitialised"
binutils/
* readelf.c (dump_section_as_strings) Avoid false positive
"may be used uninitialised".
gas/
* config/tc-arm.c (move_or_literal_pool): Avoid false positive
"may be used uninitialised".
(opcode_lookup): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1aa2792..75cf73e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2020-08-24 Alan Modra <amodra@gmail.com> + * config/tc-arm.c (move_or_literal_pool): Avoid false positive + "may be used uninitialised". + (opcode_lookup): Likewise. + +2020-08-24 Alan Modra <amodra@gmail.com> + PR 26526 * symbols.c (local_symbol_convert): Clear out xtra. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index c5ad260..3eb7e96 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -8898,16 +8898,13 @@ move_or_literal_pool (int i, enum lit_type t, bfd_boolean mode_3) /* Check if on thumb2 it can be done with a mov.w, mvn or movw instruction. */ unsigned int newimm; - bfd_boolean isNegated; + bfd_boolean isNegated = FALSE; newimm = encode_thumb32_immediate (v); - if (newimm != (unsigned int) FAIL) - isNegated = FALSE; - else + if (newimm == (unsigned int) FAIL) { newimm = encode_thumb32_immediate (~v); - if (newimm != (unsigned int) FAIL) - isNegated = TRUE; + isNegated = TRUE; } /* The number can be loaded with a mov.w or mvn @@ -22622,6 +22619,7 @@ opcode_lookup (char **str) /* Look for unaffixed or special-case affixed mnemonic. */ opcode = (const struct asm_opcode *) str_hash_find_n (arm_ops_hsh, base, end - base); + cond = NULL; if (opcode) { /* step U */ |