Skip to content

Commit

Permalink
compiler/clang: ignore main-return-type warning for clang
Browse files Browse the repository at this point in the history
Unlike gcc, clang splits out the flag controlling warnings about the return
type of `main' from other warnings related to that function. Add the extra
-Wno-main-return-type flag to mask these warnings when building Zephyr
without -ffreestanding, as when using picolibc.

Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
keith-packard authored and fabiobaltieri committed Feb 20, 2023
1 parent e79fee7 commit 0f692f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/compiler/clang/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ check_set_compiler_property(PROPERTY warning_base
-Wformat-security
-Wno-format-zero-length
-Wno-main
-Wno-main-return-type
-Wno-unused-but-set-variable
-Wno-typedef-redefinition
-Wno-deprecated-non-prototype
Expand Down

0 comments on commit 0f692f5

Please sign in to comment.