Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 00b3941

Browse filesBrowse files
authored
change(build): add -Werror=return-type to default C and C++ flags (espressif#10216)
1 parent 4098c53 commit 00b3941
Copy full SHA for 00b3941

File tree

Expand file treeCollapse file tree

2 files changed

+15
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-2
lines changed

‎platform.txt

Copy file name to clipboardExpand all lines: platform.txt
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ compiler.warning_flags.default=
4646
compiler.warning_flags.more=-Wall
4747
compiler.warning_flags.all=-Wall -Wextra
4848

49+
# Additional flags specific to Arduino (not based on IDF flags).
50+
# Update tools/platformio-build.py when changing these flags.
51+
compiler.common_werror_flags=-Werror=return-type
52+
4953
# Compile Flags
5054
compiler.cpreprocessor.flags="@{compiler.sdk.path}/flags/defines" "-I{build.source.path}" -iprefix "{compiler.sdk.path}/include/" "@{compiler.sdk.path}/flags/includes" "-I{compiler.sdk.path}/{build.memory_type}/include"
51-
compiler.c.flags="@{compiler.sdk.path}/flags/c_flags" {compiler.warning_flags} {compiler.optimization_flags}
52-
compiler.cpp.flags="@{compiler.sdk.path}/flags/cpp_flags" {compiler.warning_flags} {compiler.optimization_flags}
55+
compiler.c.flags="@{compiler.sdk.path}/flags/c_flags" {compiler.warning_flags} {compiler.optimization_flags} {compiler.common_werror_flags}
56+
compiler.cpp.flags="@{compiler.sdk.path}/flags/cpp_flags" {compiler.warning_flags} {compiler.optimization_flags} {compiler.common_werror_flags}
5357
compiler.S.flags="@{compiler.sdk.path}/flags/S_flags" {compiler.warning_flags} {compiler.optimization_flags}
5458
compiler.c.elf.flags="@{compiler.sdk.path}/flags/ld_flags" "@{compiler.sdk.path}/flags/ld_scripts"
5559
compiler.c.elf.libs="@{compiler.sdk.path}/flags/ld_libs"

‎tools/platformio-build.py

Copy file name to clipboardExpand all lines: tools/platformio-build.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ def add_tinyuf2_extra_image():
164164
)
165165
)
166166

167+
#
168+
# Additional flags specific to Arduino core (not based on IDF)
169+
#
170+
171+
env.Append(
172+
CFLAGS=["-Werror=return-type"],
173+
CXXFLAGS=["-Werror=return-type"],
174+
)
175+
167176
#
168177
# Target: Build Core Library
169178
#

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.