From 49840056da4da43d3bb7263efd9d141466de9f97 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 30 Jun 2015 14:20:31 +0000 Subject: [PATCH 1/5] diff: use size_t format --- src/diff_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diff_print.c b/src/diff_print.c index 546488c2f..d406a441a 100644 --- a/src/diff_print.c +++ b/src/diff_print.c @@ -336,7 +336,7 @@ static int format_binary( "delta" : "literal"; const char *scan, *end; - git_buf_printf(pi->buf, "%s %lu\n", typename, inflatedlen); + git_buf_printf(pi->buf, "%s %" PRIuZ "\n", typename, inflatedlen); pi->line.num_lines++; for (scan = data, end = data + datalen; scan < end; ) { From 69c8bf7e0dd7b2db5d659e6fd329f229b7197af2 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 30 Jun 2015 14:21:29 +0000 Subject: [PATCH 2/5] posix compat: include sys/stat.h for mingw --- src/unix/posix.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/posix.h b/src/unix/posix.h index c852936be..777350990 100644 --- a/src/unix/posix.h +++ b/src/unix/posix.h @@ -11,6 +11,7 @@ #include #include #include +#include typedef int GIT_SOCKET; #define INVALID_SOCKET -1 From 0305721c109f1c36269dffd4c763ac57855318cf Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 30 Jun 2015 14:23:41 +0000 Subject: [PATCH 3/5] winhttp: remove unused var --- src/transports/winhttp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index f84e2ae9f..da047d690 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -1096,7 +1096,6 @@ static int winhttp_stream_write_chunked( size_t len) { winhttp_stream *s = (winhttp_stream *)stream; - winhttp_subtransport *t = OWNING_SUBTRANSPORT(s); int error; if (!s->request && winhttp_stream_connect(s) < 0) From 504b069701ff9c04717e2b8b9e119d51f061dfbc Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 30 Jun 2015 14:25:00 +0000 Subject: [PATCH 4/5] checkout test: mark unused vars --- tests/checkout/conflict.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/checkout/conflict.c b/tests/checkout/conflict.c index 006dc6522..dd2dd3131 100644 --- a/tests/checkout/conflict.c +++ b/tests/checkout/conflict.c @@ -161,7 +161,10 @@ static void ensure_workdir_oid(const char *path, const char *oid_str) static void ensure_workdir_mode(const char *path, int mode) { -#ifndef GIT_WIN32 +#ifdef GIT_WIN32 + GIT_UNUSED(path); + GIT_UNUSED(mode); +#else git_buf fullpath = GIT_BUF_INIT; struct stat st; From eb29292aed7cd264162809678ab9cf31bcc20ac4 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 30 Jun 2015 14:25:51 +0000 Subject: [PATCH 5/5] index tests: add eol to avoid compiler warning --- tests/index/addall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/index/addall.c b/tests/index/addall.c index f344cc6ae..9ddb27f95 100644 --- a/tests/index/addall.c +++ b/tests/index/addall.c @@ -443,4 +443,4 @@ void test_index_addall__removes_deleted_conflicted_files(void) git_annotated_commit_free(annotated); git_reference_free(ref); git_index_free(index); -} \ No newline at end of file +}