diff mbox series

[kvm-unit-tests,4/4] Makefile: Compile with -Wmissing-prototypes and -Wstrict-prototypes

Message ID 1538123582-17442-5-git-send-email-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series Compile with -Wmissing-prototypes and -Wstrict-prototypes | expand

Commit Message

Thomas Huth Sept. 28, 2018, 8:33 a.m. UTC
With these compiler flags, we can be sure that the implementation really
matches the prototypes in the headers.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

David Hildenbrand Sept. 28, 2018, 11:20 a.m. UTC | #1
On 28/09/2018 10:33, Thomas Huth wrote:
> With these compiler flags, we can be sure that the implementation really
> matches the prototypes in the headers.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 7c0f8e2..e9f0227 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -53,6 +53,7 @@ cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
>  COMMON_CFLAGS += -g $(autodepend-flags)
>  COMMON_CFLAGS += -Wall -Wwrite-strings -Wclobbered -Wempty-body -Wuninitialized
>  COMMON_CFLAGS += -Wignored-qualifiers -Wunused-but-set-parameter
> +COMMON_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
>  COMMON_CFLAGS += -Werror
>  frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
>  fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
> 

Acked-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 7c0f8e2..e9f0227 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,7 @@  cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
 COMMON_CFLAGS += -g $(autodepend-flags)
 COMMON_CFLAGS += -Wall -Wwrite-strings -Wclobbered -Wempty-body -Wuninitialized
 COMMON_CFLAGS += -Wignored-qualifiers -Wunused-but-set-parameter
+COMMON_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
 COMMON_CFLAGS += -Werror
 frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
 fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")