summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4291ca0)
raw | patch | inline | side by side (parent: 4291ca0)
author | Steven Grimm <koreth@midwinter.com> | |
Sun, 3 Jun 2007 21:12:06 +0000 (14:12 -0700) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 4 Jun 2007 06:39:48 +0000 (08:39 +0200) |
fprintf wants an int parameter for the field width of a "%.*s" expression, but
the code was passing a size_t instead. This potentially broke systems where
sizeof(size_t) != sizeof(int). And even on systems where it did't break,
it still caused a compiler warning.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
the code was passing a size_t instead. This potentially broke systems where
sizeof(size_t) != sizeof(int). And even on systems where it did't break,
it still caused a compiler warning.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c | patch | blob | history |
index 6adfb334e9d3546511ffc737a2e89621f50631fc..b09d91bf98189b3ea947eaba3b254bfea3dbc10c 100644 (file)
--- a/tig.c
+++ b/tig.c
if (status == ERR) {
fprintf(stderr, "Error on line %d, near '%.*s': %s\n",
- config_lineno, optlen, opt, config_msg);
+ config_lineno, (int) optlen, opt, config_msg);
config_errors = TRUE;
}