mirror of
https://git.zx2c4.com/cgit
synced 2025-06-26 19:58:42 +02:00
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:
parent
a4c58d92bf
commit
e4ddc8f72b
6 changed files with 25 additions and 12 deletions
2
cgit.c
2
cgit.c
|
@ -610,7 +610,7 @@ static void process_cached_repolist(const char *path)
|
|||
hash = hash_str(path);
|
||||
if (ctx.cfg.project_list)
|
||||
hash += hash_str(ctx.cfg.project_list);
|
||||
cached_rc = xstrdup(fmt("%s/rc-%8x", ctx.cfg.cache_root, hash));
|
||||
cached_rc = xstrdup(fmt("%s/rc-%8lx", ctx.cfg.cache_root, hash));
|
||||
|
||||
if (stat(cached_rc, &st)) {
|
||||
/* Nothing is cached, we need to scan without forking. And
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue