Commit 5470988c by Ben Clayton

CMakeLists: Enabled more clang warnings.

Enable `-Wextra` and `-Wunreachable-code-loop-increment`. Disable `-Wno-unused-parameter`. Detects the build warning / breakage fixed by https://swiftshader-review.googlesource.com/c/SwiftShader/+/43989. Bug: none. Reducing chance of future build breakages. Change-Id: I3001f0ded71f2f71f817581996cc727e345845a3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43991 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 21fb75fe
......@@ -364,6 +364,8 @@ else()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND SWIFTSHADER_COMPILE_OPTIONS
"-Wextra"
"-Wunreachable-code-loop-increment"
"-Wunused-lambda-capture"
"-Wstring-conversion"
"-Wextra-semi"
......@@ -403,6 +405,7 @@ else()
"-Wno-comment" # multi-line comment
"-Wno-undefined-var-template" # instantiation of variable 'X' required here, but no definition is available
"-Wno-extra-semi" # extra ';' after member function definition
"-Wno-unused-parameter" # unused parameter 'X'
# Silence errors caused by unknown warnings when building with older
# versions of Clang. This demands checking that warnings added above
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment