Skip to content

Commit

Permalink
Add -Wformat-type-confusion to catch a wider range of format string e…
Browse files Browse the repository at this point in the history
…rrors. (project-chip#7993)

This is supported by clang, not gcc, hence adding this only to the
clang cflags in the strict warnings config.

lwip triggers this warning a lot, so we disable it there.

Fixes project-chip#7935
  • Loading branch information
bzbarsky-apple authored and Nikita committed Sep 23, 2021
1 parent b2a2e61 commit 1c62898
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ config("strict_warnings") {
cflags += [
"-Wimplicit-fallthrough",
"-Wheader-hygiene",
"-Wformat-type-confusion",
]
}

Expand Down
1 change: 1 addition & 0 deletions third_party/lwip/lwip.gni
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ template("lwip_target") {
"-Wno-type-limits",
"-Wno-unused-variable",
"-Wno-maybe-uninitialized",
"-Wno-format-type-confusion",
]
}

Expand Down

0 comments on commit 1c62898

Please sign in to comment.