1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
From 228447a166be2743cc377c99968cad0df1cb4909 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Thu, 23 Apr 2026 20:45:47 +0100
Subject: [PATCH 1/1] disable werror
Signed-off-by: Leah Rowe <leah@libreboot.org>
---
.ycm_extra_conf.py | 1 -
CompilerChecks.cmake | 23 -----------------------
2 files changed, 24 deletions(-)
diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
index 8305a8b..538bc2b 100644
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -4,7 +4,6 @@ import ycm_core
flags = [
'-Wall',
'-Wextra',
-'-Werror',
'-x', 'c',
'-Iinclude',
]
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
index e39cc1d..5fd39d8 100644
--- a/CompilerChecks.cmake
+++ b/CompilerChecks.cmake
@@ -2,20 +2,6 @@ include(AddCCompilerFlag)
include(CheckCCompilerFlagSSP)
if (UNIX)
- #
- # Check for -Werror turned on if possible
- #
- # This will prevent that compiler flags are detected incorrectly.
- #
- check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR)
- if (REQUIRED_FLAGS_WERROR)
- set(CMAKE_REQUIRED_FLAGS "-Werror")
-
- if (PICKY_DEVELOPER)
- list(APPEND SUPPORTED_COMPILER_FLAGS "-Werror")
- endif()
- endif()
-
add_c_compiler_flag("-std=gnu99" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wpedantic" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wall" SUPPORTED_COMPILER_FLAGS)
@@ -23,20 +9,12 @@ if (UNIX)
add_c_compiler_flag("-Wmissing-prototypes" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wcast-align" SUPPORTED_COMPILER_FLAGS)
#add_c_compiler_flag("-Wcast-qual" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=address" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wstrict-prototypes" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=strict-prototypes" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wwrite-strings" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=write-strings" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror-implicit-function-declaration" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wpointer-arith" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=pointer-arith" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wreturn-type" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=return-type" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wuninitialized" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=uninitialized" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wimplicit-fallthrough" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=strict-overflow" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wstrict-overflow=2" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wmissing-field-initializers" SUPPORTED_COMPILER_FLAGS)
@@ -47,7 +25,6 @@ if (UNIX)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wformat")
endif()
add_c_compiler_flag("-Wformat-security" SUPPORTED_COMPILER_FLAGS)
- add_c_compiler_flag("-Werror=format-security" SUPPORTED_COMPILER_FLAGS)
# Allow zero for a variadic macro argument
string(TOLOWER "${CMAKE_C_COMPILER_ID}" _C_COMPILER_ID)
--
2.47.3
|