From 68170e9813a2c31ee7e8d3cfbd34d023d5d3103d Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 6 Jun 2003 21:43:36 +0000 Subject: [PATCH] Fix compile warnings on ia64 (especially the many, many in wirecheck.c). --- lnet/klnds/toelnd/toenal_cb.c | 7 +++---- lnet/utils/wirecheck.c | 16 ++++++++-------- lustre/portals/knals/toenal/toenal_cb.c | 7 +++---- lustre/portals/utils/wirecheck.c | 16 ++++++++-------- lustre/utils/wirecheck.c | 16 ++++++++-------- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/lnet/klnds/toelnd/toenal_cb.c b/lnet/klnds/toelnd/toenal_cb.c index 8270196..ec37f6f 100644 --- a/lnet/klnds/toelnd/toenal_cb.c +++ b/lnet/klnds/toelnd/toenal_cb.c @@ -423,11 +423,10 @@ ktoenal_send(nal_cb_t *nal, void *private, lib_msg_t *cookie, * packet as a side-effect of another packet, such as when an ACK has * been requested. -phil */ - CDEBUG(D_NET, "sending "LPSZ" bytes from [%d](%p,%d)... to nid: "LPX64" pid %d\n", - payload_len, payload_niov, + CDEBUG(D_NET, "sending %d bytes from [%d](%p,%d)... to nid: " + LPX64" pid %d\n", (int)payload_len, payload_niov, payload_niov > 0 ? payload_iov[0].iov_base : NULL, - payload_niov > 0 ? payload_iov[0].iov_len : 0, - nid, pid); + (int)(payload_niov > 0 ? payload_iov[0].iov_len : 0), nid, pid); if ((conn = ktoenal_get_conn (nid)) == NULL) { diff --git a/lnet/utils/wirecheck.c b/lnet/utils/wirecheck.c index 52a37c2f..6a4377b 100644 --- a/lnet/utils/wirecheck.c +++ b/lnet/utils/wirecheck.c @@ -30,25 +30,25 @@ do { \ #define CHECK_MEMBER_OFFSET(s,m) \ do { \ - CHECK_VALUE (offsetof (s, m)); \ + CHECK_VALUE(offsetof(s, m)); \ } while (0) -#define CHECK_MEMBER_SIZEOF(s,m) \ -do { \ - CHECK_VALUE (sizeof (((s *)0)->m)); \ +#define CHECK_MEMBER_SIZEOF(s,m) \ +do { \ + CHECK_VALUE((int)sizeof(((s *)0)->m)); \ } while (0) #define CHECK_MEMBER(s,m) \ do { \ - CHECK_MEMBER_OFFSET (s, m); \ - CHECK_MEMBER_SIZEOF (s, m); \ + CHECK_MEMBER_OFFSET(s, m); \ + CHECK_MEMBER_SIZEOF(s, m); \ } while (0) #define CHECK_STRUCT(s) \ do { \ - BLANK_LINE (); \ + BLANK_LINE (); \ COMMENT ("Checks for struct "#s); \ - CHECK_VALUE (sizeof (s)); \ + CHECK_VALUE((int)sizeof(s)); \ } while (0) void diff --git a/lustre/portals/knals/toenal/toenal_cb.c b/lustre/portals/knals/toenal/toenal_cb.c index 8270196..ec37f6f 100644 --- a/lustre/portals/knals/toenal/toenal_cb.c +++ b/lustre/portals/knals/toenal/toenal_cb.c @@ -423,11 +423,10 @@ ktoenal_send(nal_cb_t *nal, void *private, lib_msg_t *cookie, * packet as a side-effect of another packet, such as when an ACK has * been requested. -phil */ - CDEBUG(D_NET, "sending "LPSZ" bytes from [%d](%p,%d)... to nid: "LPX64" pid %d\n", - payload_len, payload_niov, + CDEBUG(D_NET, "sending %d bytes from [%d](%p,%d)... to nid: " + LPX64" pid %d\n", (int)payload_len, payload_niov, payload_niov > 0 ? payload_iov[0].iov_base : NULL, - payload_niov > 0 ? payload_iov[0].iov_len : 0, - nid, pid); + (int)(payload_niov > 0 ? payload_iov[0].iov_len : 0), nid, pid); if ((conn = ktoenal_get_conn (nid)) == NULL) { diff --git a/lustre/portals/utils/wirecheck.c b/lustre/portals/utils/wirecheck.c index 52a37c2f..6a4377b 100644 --- a/lustre/portals/utils/wirecheck.c +++ b/lustre/portals/utils/wirecheck.c @@ -30,25 +30,25 @@ do { \ #define CHECK_MEMBER_OFFSET(s,m) \ do { \ - CHECK_VALUE (offsetof (s, m)); \ + CHECK_VALUE(offsetof(s, m)); \ } while (0) -#define CHECK_MEMBER_SIZEOF(s,m) \ -do { \ - CHECK_VALUE (sizeof (((s *)0)->m)); \ +#define CHECK_MEMBER_SIZEOF(s,m) \ +do { \ + CHECK_VALUE((int)sizeof(((s *)0)->m)); \ } while (0) #define CHECK_MEMBER(s,m) \ do { \ - CHECK_MEMBER_OFFSET (s, m); \ - CHECK_MEMBER_SIZEOF (s, m); \ + CHECK_MEMBER_OFFSET(s, m); \ + CHECK_MEMBER_SIZEOF(s, m); \ } while (0) #define CHECK_STRUCT(s) \ do { \ - BLANK_LINE (); \ + BLANK_LINE (); \ COMMENT ("Checks for struct "#s); \ - CHECK_VALUE (sizeof (s)); \ + CHECK_VALUE((int)sizeof(s)); \ } while (0) void diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 7f2c3d0..5b6a589 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -17,34 +17,34 @@ do { \ #define CHECK_DEFINE(a) \ do { \ - printf (" LASSERT ("#a" == "STRINGIFY(a)");\n"); \ + printf(" LASSERT ("#a" == "STRINGIFY(a)");\n"); \ } while (0) #define CHECK_VALUE(a) \ do { \ - printf (" LASSERT ("#a" == %d);\n", a); \ + printf(" LASSERT ("#a" == %d);\n", a); \ } while (0) #define CHECK_MEMBER_OFFSET(s,m) \ do { \ - CHECK_VALUE (offsetof (struct s, m)); \ + CHECK_VALUE(offsetof (struct s, m)); \ } while (0) #define CHECK_MEMBER_SIZEOF(s,m) \ do { \ - CHECK_VALUE (sizeof (((struct s *)0)->m)); \ + CHECK_VALUE((int)sizeof(((struct s *)0)->m)); \ } while (0) #define CHECK_MEMBER(s,m) \ do { \ - CHECK_MEMBER_OFFSET (s, m); \ - CHECK_MEMBER_SIZEOF (s, m); \ + CHECK_MEMBER_OFFSET(s, m); \ + CHECK_MEMBER_SIZEOF(s, m); \ } while (0) #define CHECK_STRUCT(s) \ do { \ - COMMENT ("Checks for struct "#s); \ - CHECK_VALUE (sizeof (struct s)); \ + COMMENT("Checks for struct "#s); \ + CHECK_VALUE((int)sizeof(struct s)); \ } while (0) -- 1.8.3.1