fcoe-utils/0002-use-of-uninitialized-values-detected-during-LTO.patch
Chris Leech 178354d795 FTBFS: fix gcc 10.2 truncation and overflow errors
rebase to 1.0.33+ from new upstream location
2020-09-21 09:44:20 -07:00

52 lines
1.3 KiB
Diff

From 64254aee4509192831b9f9cf695abd81a9656f00 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Mon, 21 Sep 2020 09:33:23 -0700
Subject: [PATCH 2/2] use of uninitialized values detected during LTO
lto-wrapper build errors
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fcoeadm_display.c | 2 +-
lib/sysfs_hba.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 4b1d358d1c8..585ecfae54e 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -348,7 +348,7 @@ static void show_short_lun_info(unsigned int hba, unsigned int port,
uint32_t blksize = 0;
char *capstr = "Unknown";
char *osname = "Unknown";
- uint64_t size;
+ uint64_t size = 0;
int rc;
rc = snprintf(path, sizeof(path),
diff --git a/lib/sysfs_hba.c b/lib/sysfs_hba.c
index a8d557e92b5..381f335d7ea 100644
--- a/lib/sysfs_hba.c
+++ b/lib/sysfs_hba.c
@@ -528,7 +528,7 @@ char *get_host_by_fcid(uint32_t fcid)
DIR *dir;
char *host = NULL;
char path[1024];
- uint32_t port_id;
+ uint32_t port_id = 0;
dir = opendir(SYSFS_HOST_DIR);
if (!dir)
@@ -562,7 +562,7 @@ char *get_rport_by_fcid(uint32_t fcid)
DIR *dir;
char *rport = NULL;
char path[1024];
- uint32_t port_id;
+ uint32_t port_id = 0;
dir = opendir(SYSFS_RPORT_DIR);
if (!dir)
--
2.18.1