7 Star 0 Fork 18

src-openEuler/irqbalance

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-32-bit-formats.patch 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
lvgenggeng 提交于 2024-09-06 11:13 . backport community patches
From 1277ea524354fa628b4189e699af8d62f8be7021 Mon Sep 17 00:00:00 2001
From: Rosen Penev <[email protected]>
Date: Sun, 31 Mar 2024 14:18:24 -0700
Subject: [PATCH 1/1] fix 32-bit formats
exposed with -Wformat when building on 32-bit systems
Signed-off-by: Rosen Penev <[email protected]>
---
placement.c | 2 +-
ui/ui.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/placement.c b/placement.c
index 9fde8cb..dea7c23 100644
--- a/placement.c
+++ b/placement.c
@@ -172,7 +172,7 @@ static void validate_irq(struct irq_info *info, void *data)
{
if (info->assigned_obj != data)
log(TO_CONSOLE, LOG_INFO, "object validation error: irq %d is wrong, points to %p, should be %p\n",
- info->irq, info->assigned_obj, data);
+ info->irq, (void*)info->assigned_obj, data);
}
static void validate_object(struct topo_obj *d, void *data __attribute__((unused)))
diff --git a/ui/ui.c b/ui/ui.c
index bee6868..8354fc6 100644
--- a/ui/ui.c
+++ b/ui/ui.c
@@ -101,7 +101,7 @@ int get_valid_sleep_input(int column_offest)
if(input == NULL) {
curs_set(0);
attrset(COLOR_PAIR(1));
- mvprintw(2, column_offest, "%lu ", new_sleep);
+ mvprintw(2, column_offest, "%" PRIu64 " ", new_sleep);
move(LINES, COLS);
break;
}
@@ -125,7 +125,7 @@ int get_valid_sleep_input(int column_offest)
}
attrset(COLOR_PAIR(1));
- mvprintw(2, column_offest, "%lu ", new_sleep);
+ mvprintw(2, column_offest, "%" PRIu64 " ", new_sleep);
return new_sleep;
}
@@ -296,7 +296,7 @@ void handle_cpu_banning()
case '\r': {
attrset(COLOR_PAIR(3));
int banned = toggle_cpu(tmp, position + offset - 6);
- mvprintw(position, 3, "CPU %d ", position + offset - 6);
+ mvprintw(position, 3, "CPU %zu ", position + offset - 6);
if(banned) {
mvprintw(position, 19, "YES");
} else {
@@ -770,7 +770,7 @@ void display_tree_node_irqs(irq_t *irq, void *data)
if (max_offset >= offset && max_offset - offset < LINES - 5) {
snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", (char *)data);
attrset(COLOR_PAIR(3));
- printw("%sIRQ %u, IRQs since last rebalance %lu\n",
+ printw("%sIRQ %u, IRQs since last rebalance %" PRIu64 "\n",
indent, irq->vector, irq->diff);
}
max_offset++;
--
2.20.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/irqbalance.git
[email protected]:src-openeuler/irqbalance.git
src-openeuler
irqbalance
irqbalance
master

搜索帮助