numatop/0017-Revert-common-reg-Add-pragmas-to-silence-false-posit.patch

45 lines
1.2 KiB
Diff
Raw Normal View History

From 2410088f0f22f5f76ac860c9c4bb48944c828940 Mon Sep 17 00:00:00 2001
From: Andi Kleen <ak@linux.intel.com>
Date: Wed, 31 Jul 2024 16:28:18 -0700
Subject: [PATCH 17/32] Revert "common/reg: Add pragmas to silence false
positive warnings"
This reverts commit 5509f2830b5376ff24690b7bed076053db25232c.
---
common/reg.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/common/reg.c b/common/reg.c
index f969cbc..ad37274 100644
--- a/common/reg.c
+++ b/common/reg.c
@@ -239,12 +239,9 @@ reg_line_write(win_reg_t *r, int line, reg_align_t align, char *content)
pos_x = (r->ncols_scr - len) / 2;
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
if (len > 0) {
(void) mvwprintw(r->hdl, line, pos_x, "%s", content);
}
-#pragma GCC diagnostic pop
if (r->mode != 0) {
(void) wattroff(r->hdl, r->mode);
@@ -269,12 +266,9 @@ reg_highlight_write(win_reg_t *r, int line, int align, char *content)
pos_x = (r->ncols_scr - len) / 2;
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-security"
if (len > 0) {
(void) mvwprintw(r->hdl, line, pos_x, "%s", content);
}
-#pragma GCC diagnostic pop
(void) wattroff(r->hdl, A_REVERSE | A_BOLD);
}
--
2.41.0