aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorlmamane <lmamane@users.noreply.github.com>2025-03-14 12:10:41 +0000
committerGitHub <noreply@github.com>2025-03-14 13:10:41 +0100
commitc0638c600707805b84757177c3e1ea61e1e026e0 (patch)
treea6a39b02c3e770f013a60e91c40d245df97ab700 /src/displayapp/screens/SystemInfo.cpp
parent30e56834d5301a1e2c2578770293365a7664d9f1 (diff)
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>
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
-rw-r--r--src/displayapp/screens/SystemInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index 886dacb6..01204aed 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -241,7 +241,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};