From ebfd56106d033c92f5f1a7d1c55d3509ebf978f7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 4 Jan 2023 16:35:47 +0100 Subject: [PATCH] Enable more warnings by default These are also useful warnings that tend to find real bugs, so let's enable then. The downside is they require us to mark certain things so the compiler knows if they were on purpose or not. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 486c64ab..ce47949c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,8 +73,8 @@ ENDIF() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") # Tell the compiler to be stringent -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Wvla") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat=2 -Wvla") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla") # Make sure we catch these issues whilst developing IF(CMAKE_BUILD_TYPE MATCHES Debug) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") -- 2.39.5