Skip to content

Commit aa0ae59

Browse files
committed
cmake: explicitly enable int-conversion warnings
While GCC enables int-conversion warnings by default, it will currently only warn about such errors even in case where "-DENABLE_WERROR=ON" has been passed to CMake. Explicitly enable int-conversion warnings by using our `ENABLE_WARNINGS` macro, which will automatically use "-Werror=int-conversions" in case it has been requested by the user.
1 parent dbb4a58 commit aa0ae59

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ ELSE ()
233233
DISABLE_WARNINGS(unused-function)
234234
ENABLE_WARNINGS(format)
235235
ENABLE_WARNINGS(format-security)
236+
ENABLE_WARNINGS(int-conversion)
236237

237238
IF (APPLE) # Apple deprecated OpenSSL
238239
DISABLE_WARNINGS(deprecated-declarations)

0 commit comments

Comments
 (0)