fixes compiler warnings (#9619)

* compiler warnings: adds SYSTEM to [target_]include_directories to skip warnings originating from dependencies

* compiler warnings: uninitialized/unused variables, missing parenthesis, pragma

* compiler warnings: redundant template type, missing curly braces, pass 0 instead of NULL as int argument

* compiler warnings: removes fclose(fp) where fp==nullptr since fclose() has attribute __nonnull((1))

* compiler warnings: uninitialized variables, missing parentheses, missing curly braces

* compiler warnings: ? as lower precedence than <<

* compiler warnings: unused variable

* compiler warnings: unused result

* compiler warnings: undefined/unused variable

* compiler warnings: uninitialized variable
This commit is contained in:
Dipl.-Ing. Raoul Rubien, BSc
2025-06-14 15:05:25 +02:00
committed by GitHub
parent 9569841091
commit 3ecca6116d
38 changed files with 90 additions and 92 deletions

View File

@@ -51,7 +51,7 @@ void StateHandler::update_binds()
int diff = bind_states ^ bind_states_;
State states[] = {Enabled, Checked, Focused, Hovered, Pressed};
wxEventType events[] = {EVT_ENABLE_CHANGED, wxEVT_CHECKBOX, wxEVT_SET_FOCUS, wxEVT_ENTER_WINDOW, wxEVT_LEFT_DOWN};
wxEventType events2[] = {{0}, {0}, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
wxEventType events2[] = {0, 0, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
for (int i = 0; i < 5; ++i) {
int s = states[i];
if (diff & s) {
@@ -74,7 +74,7 @@ void StateHandler::set_state(int state, int mask)
{
if ((states_ & mask) == (state & mask)) return;
int old = states_;
states_ = states_ & ~mask | state & mask;
states_ = (states_ & ~mask) | (state & mask);
if (old != states_ && (old | states2_) != (states_ | states2_)) {
if (parent_)
parent_->changed(states_ | states2_);
@@ -94,7 +94,7 @@ void StateHandler::changed(wxEvent &event)
{
event.Skip();
wxEventType events[] = {EVT_ENABLE_CHANGED, wxEVT_CHECKBOX, wxEVT_SET_FOCUS, wxEVT_ENTER_WINDOW, wxEVT_LEFT_DOWN};
wxEventType events2[] = {{0}, {0}, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
wxEventType events2[] = {0, 0, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
int old = states_;
// some events are from another window (ex: text_ctrl of TextInput), save state in states2_ to avoid conflicts
for (int i = 0; i < 5; ++i) {