[openib-general] [PATCH] osm: trivial fixes for compilation on windows

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Sun Nov 26 23:03:31 PST 2006


Hi Hal.

Some casting for windows compilation.

--
Yevgeny

Signed-off-by:  Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
 
Index: osm_sa.c
===================================================================
--- osm_sa.c	(revision 10162)
+++ osm_sa.c	(working copy)
@@ -904,7 +904,7 @@ int unpack_##name##x(char *p, uint##x##_
 		return -1; \
 	} \
 	*val_ptr = cl_hton##x((uint##x##_t)num); \
-	return q - p; \
+	return (int)(q - p); \
 }
 
 #define cl_hton8(x) (x)
@@ -925,7 +925,7 @@ static int unpack_string(char *p, uint8_
 	*buf = '\0';
 	if (*q == delim && delim != ' ')
 		q++;
-	return q - p;
+	return (int)(q - p);
 }
 
 static int unpack_string64(char *p, uint8_t *buf)




More information about the general mailing list