silenced warning on X86_64 build by casying numerical operand of snprintf
authorEdouard Tisserant
Wed, 16 Nov 2011 17:48:22 +0100
changeset 389 94b67e38188a
parent 388 17eaad42ba88
child 390 9cf96d45853d
silenced warning on X86_64 build by casying numerical operand of snprintf
lib/iec_std_lib.h
--- a/lib/iec_std_lib.h	Fri Nov 04 18:40:58 2011 +0100
+++ b/lib/iec_std_lib.h	Wed Nov 16 17:48:22 2011 +0100
@@ -340,7 +340,7 @@
 static inline STRING __bit_to_string(LWORD IN) {
     STRING res;
     res = __INIT_STRING;
-    res.len = snprintf((char*)res.body, STR_MAX_LEN, "16#%llx", IN);
+    res.len = snprintf((char*)res.body, STR_MAX_LEN, "16#%llx",(long long unsigned int)IN);
     if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
     return res;
 }
@@ -354,14 +354,14 @@
 static inline STRING __sint_to_string(LINT IN) {
     STRING res;
     res = __INIT_STRING;
-    res.len = snprintf((char*)res.body, STR_MAX_LEN, "%lld", IN);
+    res.len = snprintf((char*)res.body, STR_MAX_LEN, "%lld", (long long int)IN);
     if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
     return res;
 }
 static inline STRING __uint_to_string(ULINT IN) {
     STRING res;
     res = __INIT_STRING;
-    res.len = snprintf((char*)res.body, STR_MAX_LEN, "%llu", IN);
+    res.len = snprintf((char*)res.body, STR_MAX_LEN, "%llu", (long long unsigned int)IN);
     if(res.len > STR_MAX_LEN) res.len = STR_MAX_LEN;
     return res;
 }