aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-11-26 16:10:43 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-12-02 12:17:25 +0100
commit29467e04fbc15f53001c0c95227db34160b776e7 (patch)
treeddf60ed434b7190c750d77fb692472eb89ea7115 /cmake
parent7cec916ffd20a5a7999465d107a116806d6c6e96 (diff)
downloadethos-u-core-platform-29467e04fbc15f53001c0c95227db34160b776e7.tar.gz
Fixing compiler warnings
Adjusting toolchain files which compiler warnings to enable. Fixing compiler warnings reported by Arm Clang and Arm GCC. Change-Id: I715e875904ffd7ecfe994d3093cdf066373981b1
Diffstat (limited to 'cmake')
-rw-r--r--cmake/toolchain/arm-none-eabi-gcc.cmake23
-rw-r--r--cmake/toolchain/armclang.cmake20
2 files changed, 19 insertions, 24 deletions
diff --git a/cmake/toolchain/arm-none-eabi-gcc.cmake b/cmake/toolchain/arm-none-eabi-gcc.cmake
index 1605f24..d37a3dc 100644
--- a/cmake/toolchain/arm-none-eabi-gcc.cmake
+++ b/cmake/toolchain/arm-none-eabi-gcc.cmake
@@ -84,18 +84,17 @@ endif()
add_compile_options(
-Wall
-Wextra
- -Wsign-compare
- -Wunused
- -Wswitch-default
- -Wformat
+
+ -Wcast-align
-Wdouble-promotion
+ -Wformat
+ -Wmissing-field-initializers
+ -Wnull-dereference
-Wredundant-decls
-Wshadow
- -Wcast-align
- -Wnull-dereference
- -Wno-format-extra-args
- -Wno-unused-function
- -Wno-unused-parameter
- -Wno-unused-label
- -Wno-missing-field-initializers
- -Wno-return-type)
+ -Wswitch
+ -Wswitch-default
+ -Wunused
+
+ -Wno-redundant-decls
+) \ No newline at end of file
diff --git a/cmake/toolchain/armclang.cmake b/cmake/toolchain/armclang.cmake
index 3217fbf..f65b9a5 100644
--- a/cmake/toolchain/armclang.cmake
+++ b/cmake/toolchain/armclang.cmake
@@ -73,18 +73,14 @@ add_link_options(
add_compile_options(
-Wall
-Wextra
- -Wsign-compare
- -Wunused
- -Wswitch-default
- -Wformat
+
+ -Wcast-align
-Wdouble-promotion
+ -Wformat
+ -Wmissing-field-initializers
+ -Wnull-dereference
-Wredundant-decls
-Wshadow
- -Wcast-align
- -Wnull-dereference
- -Wno-format-extra-args
- -Wno-unused-function
- -Wno-unused-parameter
- -Wno-unused-label
- -Wno-missing-field-initializers
- -Wno-return-type)
+ -Wswitch-default
+ -Wunused
+)