sim: ppc: enable -Wmissing-declarations & -Wmissing-prototypes
authorMike Frysinger <vapier@gentoo.org>
Thu, 9 Sep 2021 01:49:00 +0000 (21:49 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 9 Sep 2021 03:18:43 +0000 (23:18 -0400)
This aligns with common code which already uses this flag.  We have
to add another local prototype to fix the failure, and add another
local decl for the SIM_DESC type.  Unwinding these will require a
lot more work & conversions in the process, so going with the decl
for now unblocks the warning unification.

sim/ppc/configure
sim/ppc/configure.ac
sim/ppc/sim_callbacks.h

index 2cb7ccdb86a724c934409a05654e9385889b60dd..1e42a8adac4292a9fb0960e0a59b06cf29e590f7 100755 (executable)
@@ -3483,8 +3483,8 @@ sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
 -Wno-switch -Wno-char-subscripts
 -Wempty-body -Wunused-but-set-parameter
 -Wno-error=maybe-uninitialized
--Wno-missing-declarations
--Wno-missing-prototypes
+-Wmissing-declarations
+-Wmissing-prototypes
 -Wdeclaration-after-statement -Wmissing-parameter-type
 -Wno-pointer-sign
 -Wold-style-declaration -Wold-style-definition
index 0fa7f4ee221be0efa16c811e64fdce51a0c7dbc3..82250818eab7ac85ce0df01a5883bd5cab365616 100644 (file)
@@ -424,8 +424,8 @@ sim_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith
 -Wno-switch -Wno-char-subscripts
 -Wempty-body -Wunused-but-set-parameter
 -Wno-error=maybe-uninitialized
--Wno-missing-declarations
--Wno-missing-prototypes
+-Wmissing-declarations
+-Wmissing-prototypes
 -Wdeclaration-after-statement -Wmissing-parameter-type
 -Wno-pointer-sign
 -Wold-style-declaration -Wold-style-definition
index 2b5f2a24c7be24c187750a2013cc9917ae2a47e9..08ccd2585692f56ceaf20ee2894ad33c3e4f17c5 100644 (file)
@@ -103,6 +103,13 @@ sim_io_read_stdin
 void sim_io_flush_stdoutput
 (void);
 
+/* TODO: Untangle this SIM_DESC forward decl someday. */
+typedef struct sim_state *SIM_DESC;
+void sim_io_error (SIM_DESC sd,
+                  const char *fmt,
+                  ...)
+  ATTRIBUTE_PRINTF (2, 3)
+  ATTRIBUTE_NORETURN;
 
 /* Simulator instance.  */
 extern psim *simulator;