From: Pierre Ossman Date: Wed, 4 Jan 2023 15:35:47 +0000 (+0100) Subject: Enable more warnings by default X-Git-Tag: v1.13.90~97^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ebfd56106d033c92f5f1a7d1c55d3509ebf978f7;p=tigervnc.git 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. --- 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")