]> 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 15:49:33 +0000 (17:49 +0200)
Mainly two sizeof() returning size_t which is not the size of an int
on 64-bit platforms.
(cherry picked from commit 5e4a6f13f4b3c3de0e533284d5fabd9b4bbe00cc)

src/cfgparse.c
src/standard.c

index 478b7fb346809d3287a60a238f4b97865db94908..196954a4302154bc6b13296842699ce42ecc6e5a 100644 (file)
@@ -2628,7 +2628,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);