Re: [PATCH v8 1/8] vfio: selftests: Add -Wall and -Werror to the Makefile

From: Vipin Sharma

Date: Tue May 12 2026 - 18:26:06 EST


On Tue, May 05, 2026 at 09:28:31PM +0000, Raghavendra Rao Ananta wrote:
> Add the compiler flags, -Wall and -Werror, to catch all the build
> warnings and flag them as a build error, respectively. This is to
> ensure that no obvious programmer errors are introduced. We can
> add -Wno-* flags in the future to ignore specific warnings as necesasry.
>
> Signed-off-by: Raghavendra Rao Ananta <rananta@xxxxxxxxxx>
> Reviewed-by: David Matlack <dmatlack@xxxxxxxxxx>
> ---
> tools/testing/selftests/vfio/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> index 0684932d91bfc..e26917ee169c5 100644
> --- a/tools/testing/selftests/vfio/Makefile
> +++ b/tools/testing/selftests/vfio/Makefile
> @@ -23,6 +23,7 @@ include lib/libvfio.mk
>
> CFLAGS += -I$(top_srcdir)/tools/include
> CFLAGS += -MD
> +CFLAGS += -Wall -Werror
> CFLAGS += $(EXTRA_CFLAGS)
>
> LDFLAGS += -pthread
> --
> 2.54.0.545.g6539524ca2-goog
>

Reviewed-by: Vipin Sharma <vipinsh@xxxxxxxxxx>