* [PATCH] sim: ppc: enable -Wmissing-declarations & -Wmissing-prototypes
@ 2021-09-09 3:18 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-09-09 3:18 UTC (permalink / raw)
To: gdb-patches
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 | 4 ++--
sim/ppc/configure.ac | 4 ++--
sim/ppc/sim_callbacks.h | 7 +++++++
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 2cb7ccdb86a7..1e42a8adac42 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -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
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 0fa7f4ee221b..82250818eab7 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -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
diff --git a/sim/ppc/sim_callbacks.h b/sim/ppc/sim_callbacks.h
index 2b5f2a24c7be..08ccd2585692 100644
--- a/sim/ppc/sim_callbacks.h
+++ b/sim/ppc/sim_callbacks.h
@@ -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;
--
2.33.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-09 3:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 3:18 [PATCH] sim: ppc: enable -Wmissing-declarations & -Wmissing-prototypes Mike Frysinger
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).