diff --git a/bachport-Fix-GCC-12-warning.patch b/bachport-Fix-GCC-12-warning.patch new file mode 100644 index 0000000000000000000000000000000000000000..387c3595db31d0045335d7445686ad784dd67ac9 --- /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 7fefe22ecbfa917cb1ffdef7b45ffa5428e1b3a9..d6d3f40d9106a77e8be26101f43f0954ec5e9862 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