1 Star 0 Fork 71

章北海/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vircgroupv1-fix-null-string-specifier-argument-in-vi.patch 2.26 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-11-25 19:41 . sync some bugfix patches from upstream
From 164fb659e30346c7140bdda2bf9b47e59bdcebe9 Mon Sep 17 00:00:00 2001
From: wangmeiyang <wangmeiyang_yewu@cmss.chinamobile.com>
Date: Wed, 23 Nov 2022 10:28:49 +0800
Subject: [PATCH 01/23] vircgroupv1: fix null string specifier argument in
virCgroupV1ValidatePlacement
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Detected by gcc 11 -Wformat-overflow:
../../src/util/vircgroupv1.c: In function ‘virCgroupV1ValidatePlacement’:
../../src/util/virerror.h:176:5: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
176 | virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 | __FUNCTION__, __LINE__, __VA_ARGS__)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/util/vircgroupv1.c:411:13: note: in expansion of macro ‘virReportError’
411 | virReportError(VIR_ERR_INTERNAL_ERROR,
| ^~~~~~~~~~~~~~
../../src/util/vircgroupv1.c:412:80: note: format string is defined here
412 | _("Could not find placement for v1 controller %s at %s"),
| ^~
cherry-pick from 8833b42f3b092c1b401109ddf174ea1dbb1eb8c6
Signed-off-by: Scott Davis <scott.davis@starlab.io>
Signed-off-by: Meiyang Wang <wangmeiyang@cmss.chinamobile.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/util/vircgroupv1.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
index 5504441fa6..f5a96bd736 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -376,9 +376,8 @@ virCgroupV1ValidatePlacement(virCgroupPtr group,
if (!group->legacy[i].placement) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not find placement for v1 controller %s at %s"),
- virCgroupV1ControllerTypeToString(i),
- group->legacy[i].placement);
+ _("Could not find placement for v1 controller %s"),
+ virCgroupV1ControllerTypeToString(i));
return -1;
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dependent/libvirt.git
git@gitee.com:dependent/libvirt.git
dependent
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385