Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Get rid of printf format warnings with size_t arguments

I got these with GCC version 4.6.3 on Debian.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
  • Loading branch information...
commit 092517b8aeddd736ec3d8c984a02a0d9c29264c2 1 parent 2146882
Beat Bolli bbolli authored jonas committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 tig.c
6 tig.c
View
@@ -2199,7 +2199,7 @@ update_view_title(struct view *view)
? MIN(view_lines, view->lines) * 100 / view->lines
: 0;
- string_format_from(state, &statelen, " - %s %d of %ld (%d%%)",
+ string_format_from(state, &statelen, " - %s %d of %zd (%d%%)",
view->ops->type,
line->lineno,
view->lines - view->custom_lines,
@@ -5308,7 +5308,7 @@ blame_read(struct view *view, char *line)
if (!state->commit) {
state->commit = read_blame_commit(view, line, state);
- string_format(view->ref, "%s %2ld%%", view->vid,
+ string_format(view->ref, "%s %2zd%%", view->vid,
view->lines ? state->blamed * 100 / view->lines : 0);
} else if (parse_blame_info(state->commit, line)) {
@@ -6632,7 +6632,7 @@ stage_next(struct view *view, struct line *line)
for (i = 0; i < state->chunks; i++) {
if (state->chunk[i] > view->pos.lineno) {
do_scroll_view(view, state->chunk[i] - view->pos.lineno);
- report("Chunk %d of %ld", i + 1, state->chunks);
+ report("Chunk %d of %zd", i + 1, state->chunks);
return;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.