* [tig PATCH] Fix integer type mismatch on 64-bit systems
@ 2007-06-03 21:12 Steven Grimm
2007-06-04 6:47 ` Jonas Fonseca
0 siblings, 1 reply; 2+ messages in thread
From: Steven Grimm @ 2007-06-03 21:12 UTC (permalink / raw)
To: git
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.
---
tig.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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;
}
--
1.5.2.35.ga334
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [tig PATCH] Fix integer type mismatch on 64-bit systems
2007-06-03 21:12 [tig PATCH] Fix integer type mismatch on 64-bit systems Steven Grimm
@ 2007-06-04 6:47 ` Jonas Fonseca
0 siblings, 0 replies; 2+ messages in thread
From: Jonas Fonseca @ 2007-06-04 6:47 UTC (permalink / raw)
To: Steven Grimm; +Cc: git
On 6/3/07, Steven Grimm <koreth@midwinter.com> wrote:
> 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.
Thanks, I also fixed another such occurrence.
BTW, in good git spirit you are encouraged to sign off your patches. :)
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-04 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 21:12 [tig PATCH] Fix integer type mismatch on 64-bit systems Steven Grimm
2007-06-04 6:47 ` Jonas Fonseca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).