Whamcloud - gitweb
Fix compile warnings on ia64 (especially the many, many in wirecheck.c).
authoradilger <adilger>
Fri, 6 Jun 2003 21:43:36 +0000 (21:43 +0000)
committeradilger <adilger>
Fri, 6 Jun 2003 21:43:36 +0000 (21:43 +0000)
lnet/klnds/toelnd/toenal_cb.c
lnet/utils/wirecheck.c
lustre/portals/knals/toenal/toenal_cb.c
lustre/portals/utils/wirecheck.c
lustre/utils/wirecheck.c

index 8270196..ec37f6f 100644 (file)
@@ -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)
         {
index 52a37c2..6a4377b 100644 (file)
@@ -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
index 8270196..ec37f6f 100644 (file)
@@ -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)
         {
index 52a37c2..6a4377b 100644 (file)
@@ -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
index 7f2c3d0..5b6a589 100644 (file)
@@ -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)