Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work around g++ version 12, 13 and 14 spurious warning #2158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/displayapp/screens/SystemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,12 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen4() {
lv_table_set_col_width(infoTask, 3, 90);

auto nb = uxTaskGetSystemState(tasksStatus, maxTaskCount, nullptr);
// g++ emits a spurious warning (and thus error because we compile with -Werror)
// due to the way std::sort is implemented
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
std::sort(tasksStatus, tasksStatus + nb, sortById);
#pragma GCC diagnostic pop
for (uint8_t i = 0; i < nb && i < maxTaskCount; i++) {
char buffer[11] = {0};

Expand Down
Loading