1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Merge pull request #14203 from janisozaur/unused-const-variable

Add unused-const-variable warning
This commit is contained in:
Michał Janiszewski
2021-03-01 12:55:54 +01:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -242,6 +242,9 @@ else ()
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_RANGE_LOOP_ANALYSIS -Wrange-loop-analysis)
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_TAUTOLOGICAL_ZERO_COMPARE -Wtautological-unsigned-zero-compare)
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_OLD_STYLE_CAST -Wold-style-cast)
# unused-const-variable=1 only checks main compilation unit
# unused-const-variable[=2] would check for unused values from headers as well
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_UNUSED_CONST_VARIABLE -Wunused-const-variable=1)
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_CLOBBERED -Wno-clobbered)
# Disabled due to problems compiling OpenSSL on macOS.
# ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation)

View File

@@ -42,7 +42,9 @@
# define swprintf_s(a, b, c, d, ...) swprintf(a, b, c, ##__VA_ARGS__)
# endif
# if _WIN32_WINNT >= 0x0600
constexpr wchar_t SOFTWARE_CLASSES[] = L"Software\\Classes";
# endif
namespace Platform
{