[build] Fix Clang 20 warnings (#8048)

* `-Wfixed-enum-extension` was replaced with `-Wc23-extensions`
* Removed unused private variables in SysId
* Suppressed `-Wnontrivial-memcall` in imgui.h and imgui_internal.h
This commit is contained in:
Tyler Veness
2025-06-30 00:09:41 -07:00
committed by GitHub
parent f2dd81c839
commit 633603dc3d
3 changed files with 12 additions and 7 deletions

View File

@@ -47,7 +47,14 @@ macro(wpilib_target_warnings target)
# Suppress warning "enumeration types with a fixed underlying type are a
# Clang extension"
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT EMSCRIPTEN)
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-fixed-enum-extension>)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20.0)
target_compile_options(
${target}
PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-fixed-enum-extension>
)
else()
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-c23-extensions>)
endif()
endif()
# Compress debug info with GCC

View File

@@ -208,8 +208,6 @@ class Analyzer : public glass::View {
std::string m_exception;
std::vector<std::string> m_missingTests;
bool m_calcDefaults = false;
// This is true if the error popup needs to be displayed
bool m_errorPopup = false;
@@ -235,12 +233,8 @@ class Analyzer : public glass::View {
// Data analysis
std::unique_ptr<AnalysisManager> m_manager;
int m_dataset = 0;
int m_window = 8;
double m_threshold = 0.2;
float m_stepTestDuration = 0;
bool combinedGraphFit = false;
// Logger
wpi::Logger& m_logger;

View File

@@ -53,5 +53,9 @@ target_include_directories(
target_compile_features(imgui PUBLIC cxx_std_20)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 20.0)
target_compile_options(imgui PUBLIC -Wno-nontrivial-memcall)
endif()
install(TARGETS imgui EXPORT imgui)
export(TARGETS imgui FILE imgui.cmake NAMESPACE imgui::)