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>
This commit is contained in:
Mark Lodato 2010-09-04 11:30:18 -04:00
parent a4c58d92bf
commit e4ddc8f72b
6 changed files with 25 additions and 12 deletions

View file

@ -228,8 +228,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
commit->parents = NULL;
}
if (pager) {
htmlf("</table><div class='pager'>",
columns);
html("</table><div class='pager'>");
if (ofs > 0) {
cgit_log_link("[prev]", NULL, NULL, ctx.qry.head,
ctx.qry.sha1, ctx.qry.vpath,