fix testcode compile error

(cherry picked from commit 6e80019d94a1607fd30119dbf75006956bc2813e)
This commit is contained in:
lixiaokeng 2021-08-12 21:24:48 +08:00 committed by openeuler-sync-bot
parent 0e1cee66cf
commit bf9fbec130
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 835e88dd38362574ee3b0e5d2b2a3b250462e09a Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 12 May 2020 00:11:39 +0200
Subject: [PATCH] multipath-tools tests/directio: fix -Wmaybe-uninitalized
warning
Initialize aio_grp to satisfy gcc.
---
tests/directio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/directio.c b/tests/directio.c
index 3cd7a52..66aaf0e 100644
--- a/tests/directio.c
+++ b/tests/directio.c
@@ -316,7 +316,7 @@ static void test_init_free(void **state)
{
int i, count = 0;
struct checker c[4096] = {0};
- struct aio_group *aio_grp;
+ struct aio_group *aio_grp = NULL;
assert_true(list_empty(&aio_grp_list));
will_return(__wrap_io_setup, 0);
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: multipath-tools
Version: 0.8.4
Release: 9
Release: 10
Summary: Tools to manage multipath devices with the device-mapper
License: GPL-2.0-or-later and LGPL-2.0-only
URL: http://christophe.varoqui.free.fr/
@ -33,6 +33,7 @@ Patch22: 0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch
Patch23: 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch
Patch24: 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch
Patch25: 0025-fix-boolean-value-with-json-c-0.14.patch
Patch26: 0026-multipath-tools-tests-directio-fix-Wmaybe-uninitaliz.patch
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
@ -179,6 +180,12 @@ fi
%changelog
* Wed Aug 12 2021 lixiaokeng<lixiaokeng@huawei.com> - 0.8.4-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix test code compile error
* Wed Aug 11 2021 lixiaokeng<lixiaokeng@huawei.com> - 0.8.4-9
- Type:testcode
- ID:NA