From 5db1a8bb94c7e8061fb9bff0ef3a6a2dfb0ee037 Mon Sep 17 00:00:00 2001 From: xu_lei_123 Date: Fri, 30 Dec 2022 11:32:42 +0800 Subject: [PATCH] Fix GCC 12 warning --- bachport-Fix-GCC-12-warning.patch | 25 +++++++++++++++++++++++++ fcoe-utils.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 bachport-Fix-GCC-12-warning.patch diff --git a/bachport-Fix-GCC-12-warning.patch b/bachport-Fix-GCC-12-warning.patch new file mode 100644 index 0000000..387c359 --- /dev/null +++ b/bachport-Fix-GCC-12-warning.patch @@ -0,0 +1,25 @@ +From 33be0ef3579da7a451df4b945d6b150bea2d4429 Mon Sep 17 00:00:00 2001 +From: xu_lei_123 +Date: Fri, 30 Dec 2022 11:10:26 +0800 +Subject: [PATCH] Fix GCC 12 warning + +--- + fcoeadm_display.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fcoeadm_display.c b/fcoeadm_display.c +index cc8f4fe..ab75172 100644 +--- a/fcoeadm_display.c ++++ b/fcoeadm_display.c +@@ -246,7 +246,7 @@ static void show_full_lun_info(unsigned int hba, unsigned int port, + char vendor[256]; + char model[256]; + char rev[256]; +- char *osname; ++ char *osname = NULL; + char *capstr; + uint64_t lba = 0; + uint32_t blksize = 0; +-- +2.21.0 + diff --git a/fcoe-utils.spec b/fcoe-utils.spec index 7fefe22..d6d3f40 100644 --- a/fcoe-utils.spec +++ b/fcoe-utils.spec @@ -1,6 +1,6 @@ Name: fcoe-utils Version: 1.0.33 -Release: 4 +Release: 5 Summary: Fibre Channel over Ethernet utilities License: GPLv2 URL: https://github.com/morbidrsa/fcoe-utils @@ -13,6 +13,8 @@ Patch3: backport-03-use-of-uninitialized-values-detected-during-LTO. #This patch refer to ubuntu's version Patch4: backport-Fix-build-error-to-change-char-type.patch Patch5: backport-handle-NIC-names-longer-than-7-characters.patch +Patch6: bachport-Fix-GCC-12-warning.patch + BuildRequires: autoconf automake libpciaccess-devel libtool lldpad-devel systemd Requires: lldpad iproute device-mapper-multipath %{?systemd_requires} @@ -67,6 +69,9 @@ done %{_mandir}/man8/* %changelog +* Fri Dec 30 2022 xulei - 1.0.33-5 +- Backport upstream patch to fix GCC 12 warning. + * Thu Dec 29 2022 xulei - 1.0.33-4 - Backport upstream patch to handle NIC names lognger than 7 characters -- Gitee