aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2024-08-19 10:46:09 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2024-08-19 11:08:39 -0700
commit5ffe413283c4c1b9a133d704e228f51aff007410 (patch)
treef1ea1a72693d8c0eec7acae57b6b2ce1be93f5a3
parent03b09d2e34c3bd04f5e6e450a94b027c33aa6491 (diff)
downloadgdb-5ffe413283c4c1b9a133d704e228f51aff007410.zip
gdb-5ffe413283c4c1b9a133d704e228f51aff007410.tar.gz
gdb-5ffe413283c4c1b9a133d704e228f51aff007410.tar.bz2
gas: ginsn: x86: pacify Wmaybe-uininitialized compiler warning
Fix PR binutils/32091 After commit d56083b5047b8e7cc9eda2f867bd2b75724920a1, some gcc versions may warn about unintialized usage of ginsn_func. Albeit false positive, adapt the code to escape the warning. gas/config/ * tc-i386-ginsn.c (x86_ginsn_indirect_branch): Early exit if unexpected args.
-rw-r--r--gas/config/tc-i386-ginsn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/config/tc-i386-ginsn.c b/gas/config/tc-i386-ginsn.c
index b9dc9c1..a4ebdf1 100644
--- a/gas/config/tc-i386-ginsn.c
+++ b/gas/config/tc-i386-ginsn.c
@@ -488,6 +488,8 @@ x86_ginsn_indirect_branch (const symbolS *insn_end_sym)
else if (i.tm.extension_opcode == 2)
/* 0xFF /2 (call r/m). */
ginsn_func = ginsn_new_call;
+ else
+ return ginsn;
if (i.reg_operands)
{