Skip to content

Commit c0638c6

Browse files
lmamaneLionel Elie Mamane
and
Lionel Elie Mamane
authored
work around g++ version 12, 13 and 14 spurious warning (#2158)
which is an error since we compile with -Werror Co-authored-by: Lionel Elie Mamane <lionel@mamane.lu>
1 parent 30e5683 commit c0638c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/displayapp/screens/SystemInfo.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,12 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen4() {
241241
lv_table_set_col_width(infoTask, 3, 90);
242242

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

0 commit comments

Comments
 (0)