summaryrefslogtreecommitdiffabout
path: root/ui-diff.c
authorMark Lodato <lodatom@gmail.com>2010-09-04 15:30:18 (UTC)
committer Mark Lodato <lodatom@gmail.com>2010-09-04 15:35:38 (UTC)
commite4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2 (patch) (unidiff)
tree2ade0bb45e15ad5466ca4d3433201477f0c9214e /ui-diff.c
parenta4c58d92bfee0cf2e35ab1c5e828a6d790108a69 (diff)
downloadcgit-e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2.zip
cgit-e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2.tar.gz
cgit-e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2.tar.bz2
fix errors in printf-style format strings
There were many places where the arguments to a printf-like function did not match the format string. Mostly, these were a missing 'l' flag, but there were three exceptions: - In ui-stats.c, a size_t argument must be printed. C99 has the "%zu" flag for this purpose, but not all compilers support this. Therefore, we mimic what git does - use a NO_C99_FORMAT Makefile variable. - In ui-stats.c, cgit_print_error() was called with a pointer instead of a character. - In ui-log.c, the "columns" argument was never used. Signed-off-by: Mark Lodato <lodatom@gmail.com>
Diffstat (limited to 'ui-diff.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-diff.c b/ui-diff.c
index 0dcabe9..7ff7e46 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -92,7 +92,7 @@ static void print_fileinfo(struct fileinfo *info)
92 info->old_path); 92 info->old_path);
93 html("</td><td class='right'>"); 93 html("</td><td class='right'>");
94 if (info->binary) { 94 if (info->binary) {
95 htmlf("bin</td><td class='graph'>%d -> %d bytes", 95 htmlf("bin</td><td class='graph'>%ld -> %ld bytes",
96 info->old_size, info->new_size); 96 info->old_size, info->new_size);
97 return; 97 return;
98 } 98 }