open-iscsi/0017-resolve-compilation-errors.patch
2020-07-10 14:51:47 +08:00

54 lines
1.7 KiB
Diff

From 982eb357f12b86152f85fb5a1dba47e965ebf9d5 Mon Sep 17 00:00:00 2001
From: wuguanghao <wuguanghao3@huawei.com>
Date: Thu, 9 Jul 2020 14:56:28 +0800
Subject: [PATCH] resolve compilation errors
---
usr/iscsiadm.c | 2 +-
usr/log.c | 2 --
usr/mgmt_ipc.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index b386abe..ae560bc 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -352,7 +352,7 @@ static void kill_iscsid(int priority, int tmo)
} else {
rc = kill(atol(iscsidpid), 0);
if (ESRCH == rc) {
- log_error("iscsid %d maybe in zombie.\n", atol(iscsidpid));
+ log_error("iscsid %ld maybe in zombie.\n", atol(iscsidpid));
return;
}
}
diff --git a/usr/log.c b/usr/log.c
index 3a52263..00a28f1 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -473,8 +473,6 @@ static int log_watchdog_setup(void)
static int log_read_comm_frpm_pid(pid_t pid, char *buffer, int len)
{
char comm_file[256];
- char comm_content[1024];
- int r;
FILE *fd = NULL;
buffer[0] = '\0';
snprintf(comm_file, sizeof(comm_file), "/proc/%i/comm", pid);
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c
index 3b01949..9e8a323 100644
--- a/usr/mgmt_ipc.c
+++ b/usr/mgmt_ipc.c
@@ -170,7 +170,7 @@ mgmt_ipc_cfg_initiatorname(queue_task_t *qtask)
{
if (dconfig->initiator_name) {
if (VALUE_MAXLEN <= strlen(dconfig->initiator_name)){
- log_error("iscsid: len[%d] of initiator name out of range, max len %d.", strlen(dconfig->initiator_name), VALUE_MAXLEN-1);
+ log_error("iscsid: len[%ld] of initiator name out of range, max len %d.", strlen(dconfig->initiator_name), VALUE_MAXLEN-1);
return ISCSI_ERR_INVAL;
}
--
1.8.3.1