bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Enable -Wmissing-prototypes.


From: Samuel Thibault
Subject: Re: [PATCH] Enable -Wmissing-prototypes.
Date: Sun, 29 Jan 2023 16:19:30 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le dim. 29 janv. 2023 01:09:00 -0500, a ecrit:
> * 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.
> ---
>  Makefile.am       | 2 +-
>  ddb/db_input.h    | 3 +++
>  ddb/db_mp.c       | 1 +
>  i386/i386at/kd.h  | 2 +-
>  linux/Makefrag.am | 4 ++++
>  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
> -- 
> 2.39.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]