aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-01-29 01:09:00 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-29 16:19:24 +0100
commit5557f2ca9d526874a7fc499c1068ea93628a40fa (patch)
tree62b95571fecd6508c804940be4888c1f4391309a
parenta8fbf3737be9a6f5fd1d87765072292d54e54aac (diff)
downloadgnumach-5557f2ca9d526874a7fc499c1068ea93628a40fa.tar.gz
gnumach-5557f2ca9d526874a7fc499c1068ea93628a40fa.tar.bz2
gnumach-5557f2ca9d526874a7fc499c1068ea93628a40fa.zip
Enable -Wmissing-prototypes.
* Makefile.am: enable -Wmissing-prototypes * ddb/db_inout.h: Prototype kdb_kintr for entering into DDB. * ddb/db_mp.c Include ddb/db_input.h to get kdb_kintr. * i386/i386at/kd.h: Include ddb/input.h to get kdb_kintr. * linux/Makefrag.am: Disable some of the new warnings for linux drivers, otherwise we will get more and more noise. Message-Id: <Y9YNfNaYSsZJFST5@mercury.tail36e24.ts.net>
-rw-r--r--Makefile.am2
-rw-r--r--ddb/db_input.h3
-rw-r--r--ddb/db_mp.c1
-rw-r--r--i386/i386at/kd.h2
-rw-r--r--linux/Makefrag.am4
5 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index c52241e9..10d030b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,7 +61,7 @@ AM_CCASFLAGS += \
# Yes, this makes the eyes hurt. But perhaps someone will finally take care of
# all that scruffy Mach code... Also see <http://savannah.gnu.org/task/?5726>.
AM_CFLAGS += \
- -Wall -Wstrict-prototypes -Wold-style-definition
+ -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
# We need the GNU-style inline
AM_CFLAGS += \
diff --git a/ddb/db_input.h b/ddb/db_input.h
index 77f07bb6..352f035e 100644
--- a/ddb/db_input.h
+++ b/ddb/db_input.h
@@ -23,6 +23,9 @@
#include <sys/types.h>
+/* Needs to be implemented by each arch. */
+extern void kdb_kintr(void);
+
extern int db_readline (char *lstart, int lsize);
extern void db_check_interrupt(void);
diff --git a/ddb/db_mp.c b/ddb/db_mp.c
index 7c0f6f26..f4e5fa3e 100644
--- a/ddb/db_mp.c
+++ b/ddb/db_mp.c
@@ -38,6 +38,7 @@
#include <machine/db_interface.h>
#include <ddb/db_command.h>
+#include <ddb/db_input.h>
#include <ddb/db_run.h>
#include <ddb/db_mp.h>
#include <ddb/db_output.h>
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 53fbce51..3ee707b5 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -692,7 +692,7 @@ extern void kd_slmscd (void *from, void *to, int count);
extern void kdintr(int vec);
#if MACH_KDB
-extern void kdb_kintr(void);
+#include <ddb/db_input.h>
#endif /* MACH_KDB */
extern int kdopen(dev_t dev, int flag, io_req_t ior);
diff --git a/linux/Makefrag.am b/linux/Makefrag.am
index 38718a3f..23384523 100644
--- a/linux/Makefrag.am
+++ b/linux/Makefrag.am
@@ -37,6 +37,10 @@ liblinux_a_CPPFLAGS = $(AM_CPPFLAGS) \
# corresponding text segment definitions, we must always optimize.
liblinux_a_CFLAGS = -O2 $(AM_CFLAGS)
+# Disable warnings that are applied to the core Mach code.
+liblinux_a_CFLAGS += -Wno-missing-prototypes -Wno-strict-prototypes \
+ -Wno-old-style-definition
+
# See <http://lists.gnu.org/archive/html/bug-hurd/2006-01/msg00148.html>.
liblinux_a_CFLAGS += \
-fno-strict-aliasing