From 07c3971e15e6eb8279ca1a112ab3b2cdc3ca020c Mon Sep 17 00:00:00 2001 From: Steven Grimm Date: Sun, 3 Jun 2007 14:12:06 -0700 Subject: [PATCH] Fix integer type mismatch on 64-bit systems 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 --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 6adfb33..b09d91b 100644 --- a/tig.c +++ b/tig.c @@ -1153,7 +1153,7 @@ read_option(char *opt, size_t optlen, char *value, size_t valuelen) 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; } -- 2.30.2