]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] second fix for the printf format warning
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Dec 2009 20:12:16 +0000 (21:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Jan 2010 22:15:09 +0000 (23:15 +0100)
Fix 500b8f0349fb52678f5143c49f5a8be5c033a988 fixed the patch for the 64 bit
case but caused the opposite type issue to appear on 32 bit platforms. Cast
the difference and be done with it since gcc does not agree on type carrying
the difference between two pointers on 32 and 64 bit platforms.
(cherry picked from commit 3ccf94efd99db5763546750729b5a81e3b7bce19)

src/cfgparse.c

index c5e6db6a92113eab2af07fa43dd83f1fdae6350b..24d0c983c9189a746c60180c143dac9cd4bb9d21 100644 (file)
@@ -3732,7 +3732,7 @@ int readcfgfile(const char *file)
                        *line = '\0';
 
                        Alert("parsing [%s:%d]: line too long, truncating at word %d, position %ld: <%s>.\n",
-                             file, linenum, arg + 1, args[arg] - thisline + 1, args[arg]);
+                             file, linenum, arg + 1, (long)(args[arg] - thisline + 1), args[arg]);
                        err_code |= ERR_ALERT | ERR_FATAL;
                        args[arg] = line;
                }