diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-29 13:59:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-29 13:59:17 -0700 |
commit | 228905fbce620ab96c0b7d2f0efac60a95797f07 (patch) | |
tree | 28aba6d9ca34166744fd52d7b645ed990ac4a389 | |
parent | 73167677c0a0e51b3b6505a4287dd3cbf7f11497 (diff) | |
parent | d62c89afb278ab625dd399222ceb8d48b0358756 (diff) | |
download | git-228905fbce620ab96c0b7d2f0efac60a95797f07.tar.gz |
Merge branch 'jk/war-on-sprintf'
* jk/war-on-sprintf:
compat/mingw.c: remove printf format warning
read_branches_file: plug a FILE* leak
-rw-r--r-- | compat/mingw.c | 2 | ||||
-rw-r--r-- | remote.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index a168800ae0..90bdb1edde 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2131,7 +2131,7 @@ void mingw_startup() int uname(struct utsname *buf) { - DWORD v = GetVersion(); + unsigned v = (unsigned)GetVersion(); memset(buf, 0, sizeof(*buf)); xsnprintf(buf->sysname, sizeof(buf->sysname), "Windows"); xsnprintf(buf->release, sizeof(buf->release), @@ -282,6 +282,7 @@ static void read_branches_file(struct remote *remote) return; strbuf_getline(&buf, f, '\n'); + fclose(f); strbuf_trim(&buf); if (!buf.len) { strbuf_release(&buf); |