Procházet zdrojové kódy

lib/binrpc: fixed compile warnings

- reported by Juha Heinanen
(cherry picked from commit 304fe28c1f299db8a36fe6953da3c3b9afa24c12)
Daniel-Constantin Mierla před 13 roky
rodič
revize
1fca550052
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      lib/binrpc/binrpc_api.c

+ 3 - 1
lib/binrpc/binrpc_api.c

@@ -67,7 +67,9 @@
 #define UNIX_PATH_MAX 108
 #endif
 
+#ifndef INT2STR_MAX_LEN
 #define INT2STR_MAX_LEN  (19+1+1) /* 2^64~= 16*10^18 => 19+1 digits + \0 */
+#endif
 
 static void* (*internal_malloc)(size_t size) = malloc;
 static void* (*internal_realloc)(void* ptr, size_t size) = realloc;
@@ -501,7 +503,7 @@ static int get_reply(struct binrpc_handle *handle,
 		if (crt - hdr_end < tl) {
 			snprintf(binrpc_last_errs, sizeof(binrpc_last_errs)-1,
 				"get_reply: datagram truncated. Received: %ld, Expected: %d.",
-				crt-hdr_end, tl);
+				(long int)(crt-hdr_end), tl);
 			return FATAL_ERROR;		
 		}
 	}