]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: ginsn: x86: pacify Wmaybe-uininitialized compiler warning
authorIndu Bhagat <indu.bhagat@oracle.com>
Mon, 19 Aug 2024 17:46:09 +0000 (10:46 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Mon, 19 Aug 2024 18:08:39 +0000 (11:08 -0700)
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.

gas/config/tc-i386-ginsn.c

index b9dc9c10cbbc5a08df52be70fbeba36da39d2996..a4ebdf14fe48fe8188dc4b2ab04943e10b1c0408 100644 (file)
@@ -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)
     {