Fix build issue with GCC 13.2.0 and clang-17

This commit is contained in:
WarmUpTill 2024-03-21 21:06:30 +01:00 committed by WarmUpTill
parent e19f4ddf7c
commit e5ab2ceca3
4 changed files with 6 additions and 3 deletions

View File

@ -70,11 +70,14 @@ endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
# Disable false-positive warning in GCC 12.1.0 and later
add_compile_options(-Wno-error=maybe-uninitialized)
add_compile_options(-Wno-error=stringop-overflow)
# Add warning for infinite recursion (added in GCC 12)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0.0)
add_compile_options(-Winfinite-recursion)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
add_compile_options(-Wno-error=null-pointer-subtraction)
endif()
# Enable compiler and build tracing (requires Ninja generator)

View File

@ -18,7 +18,7 @@ public:
bool PerformAction();
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);
bool PostLoad() override;
bool PostLoad();
std::string GetShortDesc() const;
std::string GetId() const { return id; };
static std::shared_ptr<MacroAction> Create(Macro *m);

View File

@ -25,7 +25,7 @@ public:
bool CheckCondition();
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);
bool PostLoad() override;
bool PostLoad();
std::string GetShortDesc() const;
std::string GetId() const { return id; };
static std::shared_ptr<MacroCondition> Create(Macro *m)

View File

@ -23,7 +23,7 @@ public:
void LogAction() const;
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);
bool PostLoad() override;
bool PostLoad();
std::string GetId() const { return id; };
MacroRef GetNextMacro(bool advance = true);
static std::shared_ptr<MacroAction> Create(Macro *m);