Skip to content

Commit

Permalink
Enable gcc warning -Wold-style-cast
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Aug 22, 2024
1 parent 147d4c6 commit 8768326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/compiler_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endfunction()
# Prepares warnings setup for current target
function(compiler_get_warnings_setup VARNAME)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(WARNINGS_SETUP "-Wall -Wextra -pedantic -Wconversion -Wno-long-long -Wshadow")
set(WARNINGS_SETUP "-Wall -Wextra -pedantic -Wconversion -Wno-long-long -Wshadow -Wold-style-cast")
# gcc 7.5 reports Wsign-conversion even on static_cast, reportedly fixed in gcc 9.3
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.3.0")
set(WARNINGS_SETUP "${WARNINGS_SETUP} -Wsign-conversion")
Expand Down

0 comments on commit 8768326

Please sign in to comment.