Mostly casting between pointers and integers of different size, but a few other little things in fcping as well. With these changes fcoe-utils builds cleanly for me on both i386 and x86_64.
Signed-off-by: Chris Leech <[email protected]> --- fcnsq.c | 8 ++++---- fcoeadm_display.c | 4 ++-- fcping.c | 14 +++++++------- fcrls.c | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fcnsq.c b/fcnsq.c index 6bbcccc..4039cb4 100644 --- a/fcnsq.c +++ b/fcnsq.c @@ -173,13 +173,13 @@ static int ns_query(int bsg, void *req, int req_len, void *resp, int resp_len) .protocol = BSG_PROTOCOL_SCSI, .subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT, .request_len = sizeof(cdb), - .request = (u64) &cdb, + .request = (uintptr_t) &cdb, .dout_xfer_len = req_len, - .dout_xferp = (u64) req, + .dout_xferp = (uintptr_t) req, .din_xfer_len = resp_len, - .din_xferp = (u64) resp, + .din_xferp = (uintptr_t) resp, .max_response_len = sizeof(sense), - .response = (u64) &sense, + .response = (uintptr_t) &sense, .timeout = 1000, }; diff --git a/fcoeadm_display.c b/fcoeadm_display.c index 9d5690d..1ace624 100644 --- a/fcoeadm_display.c +++ b/fcoeadm_display.c @@ -1067,7 +1067,7 @@ static int hba_table_init(struct hba_name_table *hba_table) { HBA_STATUS retval; char namebuf[1024]; - int i, j, num_hbas = 0; + int i, num_hbas = 0; /* * Initialize the table. @@ -1122,7 +1122,7 @@ static int hba_table_init(struct hba_name_table *hba_table) hba_table[i].failed = 1; fprintf(stderr, "HBA_GetAdapterPortAttributes failed, " - "j=%d, status=%d\n", j, retval); + "retval=%d\n", retval); continue; } } diff --git a/fcping.c b/fcping.c index 302dc2d..4cba6e8 100644 --- a/fcping.c +++ b/fcping.c @@ -58,7 +58,7 @@ typedef uint8_t u8; static const char *cmdname; -#define FC_MAX_PAYLOAD (2112U - sizeof(net32_t)) +#define FC_MAX_PAYLOAD (2112UL - sizeof(net32_t)) #define MAX_SENSE_LEN 96 /* SCSI_SENSE_BUFFERSIZE */ #define MAX_HBA_COUNT 128 #define FP_LEN_DEF 32 /* default ping payload length */ @@ -81,7 +81,7 @@ fp_usage() " -i <interval>: Wait <interval> seconds between each ping\n" " -c <count>: Stop after sending <count> pings\n" " -h <hba>: eth<n>, MAC address, WWPN, or FC-ID of the HBA\n" - " -s <size>: Byte-length of ping request payload (max %ld)\n" + " -s <size>: Byte-length of ping request payload (max %lu)\n" " -F <FC-ID>: Destination port ID\n" " -P <WWPN>: Destination world-wide port name\n" " -N <WWNN>: Destination world-wide node name\n", @@ -380,7 +380,7 @@ fp_options(int argc, char *argv[]) case 's': fp_len = strtoul(optarg, &endptr, 0); if (*endptr != '\0' || fp_len > FC_MAX_PAYLOAD) - SA_LOG_EXIT("bad size %s max %d\n", + SA_LOG_EXIT("bad size %s max %lu\n", optarg, FC_MAX_PAYLOAD); if (fp_len < 4) SA_LOG_EXIT("bad size %s min %d\n", @@ -620,13 +620,13 @@ fp_ns_get_id(uint32_t op, fc_wwn_t wwn, char *response, size_t *resp_len) sg_io.protocol = BSG_PROTOCOL_SCSI; sg_io.subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT; sg_io.request_len = sizeof(cdb); - sg_io.request = (__u64)&cdb; + sg_io.request = (uintptr_t)&cdb; sg_io.dout_xfer_len = sizeof(ct); - sg_io.dout_xferp = (unsigned long)&ct; + sg_io.dout_xferp = (uintptr_t)&ct; sg_io.din_xfer_len = *resp_len; - sg_io.din_xferp = (__u64)response; + sg_io.din_xferp = (uintptr_t)response; sg_io.max_response_len = sizeof(reply); - sg_io.response = (__u64)&reply; + sg_io.response = (uintptr_t)&reply; sg_io.timeout = 1000; /* millisecond */ memset(&reply, 0, sizeof(reply)); memset(response, 0, *resp_len); diff --git a/fcrls.c b/fcrls.c index 4b5f1ae..026dbd5 100644 --- a/fcrls.c +++ b/fcrls.c @@ -253,13 +253,13 @@ static int bsg_rport_els(int bsg, u8 els_code, void *req, int req_len, .protocol = BSG_PROTOCOL_SCSI, .subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT, .request_len = sizeof(cdb), - .request = (u64)((long)&cdb), + .request = (uintptr_t)&cdb, .dout_xfer_len = req_len, - .dout_xferp = (u64)((long)req), + .dout_xferp = (uintptr_t)req, .din_xfer_len = rsp_len, - .din_xferp = (u64)((long)rsp), + .din_xferp = (uintptr_t)rsp, .max_response_len = sizeof(sense), - .response = (u64)((long)&sense), + .response = (uintptr_t)&sense, .timeout = 1000, }; memset(sense, 0, sizeof(sense)); _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
