Commit da617059 by Nicolas Capens Committed by Nicolas Capens

Fix implicit string cast to boolean warning (treated as error)

Change-Id: I94a2fd3a900fb1e2c625eaa76dcce8fa785360cd Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28850 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 5078d48f
...@@ -226,6 +226,7 @@ else() ...@@ -226,6 +226,7 @@ else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CLANG_VERSION_STRING VERSION_GREATER_EQUAL 5) CLANG_VERSION_STRING VERSION_GREATER_EQUAL 5)
set_cpp_flag("-Werror=unused-lambda-capture") set_cpp_flag("-Werror=unused-lambda-capture")
set_cpp_flag("-Werror=string-conversion")
endif() endif()
# Remove xor, and, or and friends from the list of keywords, they are used # Remove xor, and, or and friends from the list of keywords, they are used
......
...@@ -3374,7 +3374,7 @@ namespace rr ...@@ -3374,7 +3374,7 @@ namespace rr
#ifdef UNIMPLEMENTED #ifdef UNIMPLEMENTED
#undef UNIMPLEMENTED #undef UNIMPLEMENTED
#endif #endif
#define UNIMPLEMENTED(msg) assert(!msg) #define UNIMPLEMENTED(msg) assert(((void)(msg), false))
RValue<Float4> Sin(RValue<Float4> x) { UNIMPLEMENTED("Subzero Sin()"); return Float4(0); } RValue<Float4> Sin(RValue<Float4> x) { UNIMPLEMENTED("Subzero Sin()"); return Float4(0); }
RValue<Float4> Cos(RValue<Float4> x) { UNIMPLEMENTED("Subzero Cos()"); return Float4(0); } RValue<Float4> Cos(RValue<Float4> x) { UNIMPLEMENTED("Subzero Cos()"); return Float4(0); }
......
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