From abea9fcd943121b49723e896db9aaed285891b6d Mon Sep 17 00:00:00 2001 From: Wenhua Huang Date: Thu, 11 Jul 2024 10:35:17 +0800 Subject: [PATCH] discoveryd: fix additional format overflow warnings --- ...dditional-format-overflow-warnings-4.patch | 38 +++++++++++++++++++ open-iscsi.spec | 6 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0029-discoveryd-fix-additional-format-overflow-warnings-4.patch diff --git a/0029-discoveryd-fix-additional-format-overflow-warnings-4.patch b/0029-discoveryd-fix-additional-format-overflow-warnings-4.patch new file mode 100644 index 0000000..9d32f90 --- /dev/null +++ b/0029-discoveryd-fix-additional-format-overflow-warnings-4.patch @@ -0,0 +1,38 @@ +From 38bf14f1305f900e787b5fe45d4ba554580583cc Mon Sep 17 00:00:00 2001 +From: Graham Inggs +Date: Sat, 30 Sep 2023 18:22:37 +0000 +Subject: [PATCH 1/1] discoveryd: fix additional format overflow warnings + (#425) + +Similar to #413, these were seen compiling with -O3 +--- + usr/discoveryd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/usr/discoveryd.c b/usr/discoveryd.c +index 70ce60a..3760426 100644 +--- a/usr/discoveryd.c ++++ b/usr/discoveryd.c +@@ -153,8 +153,8 @@ static void update_sessions(struct list_head *new_rec_list, + */ + list_for_each_entry_safe(rec, tmp_rec, &iscsi_targets, list) { + log_debug(7, "Trying to match %s %s to %s %s %s", +- targetname, iname, rec->name, rec->conn[0].address, +- rec->iface.name); ++ targetname ? targetname : "(null)", iname ? iname : "(null)", ++ rec->name, rec->conn[0].address, rec->iface.name); + if (targetname && strcmp(rec->name, targetname)) + continue; + +@@ -169,7 +169,7 @@ static void update_sessions(struct list_head *new_rec_list, + } + + log_debug(5, "Matched %s %s, checking if in new targets.", +- targetname, iname); ++ targetname ? targetname : "(null)", iname ? iname : "(null)"); + if (!idbm_find_rec_in_list(new_rec_list, rec->name, + rec->conn[0].address, + rec->conn[0].port, &rec->iface)) { +-- +2.25.1 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 7479529..8d0d73c 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -4,7 +4,7 @@ Name: open-iscsi Version: 2.1.5 -Release: 14 +Release: 15 Summary: ISCSI software initiator daemon and utility programs License: GPLv2+ and BSD URL: http://www.open-iscsi.com @@ -37,6 +37,7 @@ patch25: 0025-iscsid-iscsiuio-fix-OOM-adjustment-377.patch patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch +patch29: 0029-discoveryd-fix-additional-format-overflow-warnings-4.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config @@ -163,6 +164,9 @@ fi %{_mandir}/man8/* %changelog +* Thu Jul 11 2024 Wenhua Huang - 2.1.5-15 +- discoveryd: fix additional format overflow warnings + * Tue Feb 20 2024 jiangjianjun - 2.1.5-14 - update open-iscsi.spec -- Gitee