[PATCH v1 32/39] contrib/plugins: enable -Wall for building plugins

Alex Bennée posted 39 patches 4 years, 5 months ago
Maintainers: Kamil Rytarowski <kamil@netbsd.org>, Reinoud Zandijk <reinoud@netbsd.org>, Ryo ONODERA <ryoon@netbsd.org>, Brad Smith <brad@comstyle.com>
[PATCH v1 32/39] contrib/plugins: enable -Wall for building plugins
Posted by Alex Bennée 4 years, 5 months ago
Lets spot the obvious errors.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 contrib/plugins/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index b9d7935e5e..17e6e2ec4f 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -24,7 +24,7 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
 # The main QEMU uses Glib extensively so it's perfectly fine to use it
 # in plugins (which many example do).
 CFLAGS = $(GLIB_CFLAGS)
-CFLAGS += -fPIC
+CFLAGS += -fPIC -Wall
 CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
 CFLAGS += -I$(SRC_PATH)/include/qemu
 
-- 
2.20.1


Re: [PATCH v1 32/39] contrib/plugins: enable -Wall for building plugins
Posted by Thomas Huth 4 years, 5 months ago
On 06/07/2021 16.58, Alex Bennée wrote:
> Lets spot the obvious errors.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   contrib/plugins/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
> index b9d7935e5e..17e6e2ec4f 100644
> --- a/contrib/plugins/Makefile
> +++ b/contrib/plugins/Makefile
> @@ -24,7 +24,7 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
>   # The main QEMU uses Glib extensively so it's perfectly fine to use it
>   # in plugins (which many example do).
>   CFLAGS = $(GLIB_CFLAGS)
> -CFLAGS += -fPIC
> +CFLAGS += -fPIC -Wall

In pc-bios/s390-ccw/Makefile we're using:

  -Wall $(filter -W%, $(QEMU_CFLAGS))

to also get the other warning options from config-host.mak. You might want 
to consider to do that here, too.

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>