From da20635d38f7e2d0d25067ac5fa0ad986f590b95 Mon Sep 17 00:00:00 2001 From: lixiaokeng Date: Thu, 12 Aug 2021 21:24:48 +0800 Subject: [PATCH] fix testcode compile error (cherry picked from commit 6e80019d94a1607fd30119dbf75006956bc2813e) --- ...tests-directio-fix-Wmaybe-uninitaliz.patch | 27 +++++++++++++++++++ multipath-tools.spec | 9 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0026-multipath-tools-tests-directio-fix-Wmaybe-uninitaliz.patch diff --git a/0026-multipath-tools-tests-directio-fix-Wmaybe-uninitaliz.patch b/0026-multipath-tools-tests-directio-fix-Wmaybe-uninitaliz.patch new file mode 100644 index 0000000..384e9f3 --- /dev/null +++ b/0026-multipath-tools-tests-directio-fix-Wmaybe-uninitaliz.patch @@ -0,0 +1,27 @@ +From 835e88dd38362574ee3b0e5d2b2a3b250462e09a Mon Sep 17 00:00:00 2001 +From: Martin Wilck +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 + diff --git a/multipath-tools.spec b/multipath-tools.spec index bf4f01e..244bad4 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -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 @@ -180,6 +181,12 @@ fi %changelog +* Wed Aug 12 2021 lixiaokeng - 0.8.4-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix test code compile error + * Wed Aug 11 2021 lixiaokeng - 0.8.4-9 - Type:testcode - ID:NA -- Gitee