!31 fix GCC 12 warning

From: @xu_lei_123 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2022-12-30 08:31:06 +00:00 committed by Gitee
commit 3494881e70
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 33be0ef3579da7a451df4b945d6b150bea2d4429 Mon Sep 17 00:00:00 2001
From: xu_lei_123 <xulei@xfusion.com>
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

View File

@ -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 <xulei@xfusion.com> - 1.0.33-5
- Backport upstream patch to fix GCC 12 warning.
* Thu Dec 29 2022 xulei <xulei@xfusion.com> - 1.0.33-4
- Backport upstream patch to handle NIC names lognger than 7 characters