]> git.kaiwu.me - haproxy.git/commitdiff
[MINOR] fix a few remaining printf-like formats on 64-bit platforms
authorWilly Tarreau <w@1wt.eu>
Sat, 11 Apr 2009 17:42:49 +0000 (19:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 May 2009 16:19:22 +0000 (18:19 +0200)
Mainly two sizeof() returning size_t which is not the size of an int
on 64-bit platforms.
(cherry picked from commit 5e4a6f13f4b3c3de0e533284d5fabd9b4bbe00cc)
(cherry picked from commit 3162903ee77d77104687f5c291948a00e169627f)

src/cfgparse.c
src/standard.c

index f067832b7d1e641ecd43e1004390fbd540c9f239..5c35017e608a61f51c9a8be02404b2735471e070 100644 (file)
@@ -2491,7 +2491,7 @@ int readcfgfile(const char *file)
                         * Watch out for the last line without the terminating '\n'!
                         */
                        Alert("parsing [%s:%d]: line too long, limit: %d.\n",
-                               file, linenum, sizeof(thisline)-1);
+                             file, linenum, (int)sizeof(thisline)-1);
                        goto err;
                }
 
index 7f749f957505a0517f9100250f80e2e644588c9f..d419db97229dafc6817f7e70766e95633236f524 100644 (file)
@@ -92,7 +92,7 @@ struct sockaddr_un *str2sun(const char *str)
        strsz = strlen(str) + 1;
        if (strsz > sizeof(su.sun_path)) {
                Alert("Socket path '%s' too long (max %d)\n",
-                       str, sizeof(su.sun_path) - 1);
+                     str, (int)sizeof(su.sun_path) - 1);
        } else {
                su.sun_family = AF_UNIX;
                memcpy(su.sun_path, str, strsz);