* [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c
@ 2023-07-17 8:41 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-07-17 8:41 UTC (permalink / raw)
To: binutils
Somebody on irc mentioned the following warning.
When building gdb with -O2 -flto, we run into:
...
opcodes/ft32-dis.c:30: warning: type of 'ft32_opc_info' does not match \
original declaration [-Wlto-type-mismatch]
30 | extern const ft32_opc_info_t ft32_opc_info[128];
|
opcodes/ft32-opc.c:25: note: array types have different bounds
25 | const ft32_opc_info_t ft32_opc_info[] =
|
opcodes/ft32-opc.c:25: note: 'ft32_opc_info' was previously declared here
...
Fix this by using ft32_opc_info[] in opcodes/ft32-dis.c.
Tested on x86_64-linux.
---
opcodes/ft32-dis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opcodes/ft32-dis.c b/opcodes/ft32-dis.c
index 493297549bf..4c7cac5968d 100644
--- a/opcodes/ft32-dis.c
+++ b/opcodes/ft32-dis.c
@@ -27,7 +27,7 @@
#include "opcode/ft32.h"
#include "disassemble.h"
-extern const ft32_opc_info_t ft32_opc_info[128];
+extern const ft32_opc_info_t ft32_opc_info[];
static fprintf_ftype fpr;
static void *stream;
base-commit: 8193fa9cbe1a6cdb2cb41cedb835de33a1c755e3
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-17 8:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 8:41 [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).