Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f60073

Browse files
committed
Merge pull request libgit2#3273 from ethomson/warnings3
More warnings
2 parents cb58fb2 + eb29292 commit 2f60073

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

src/diff_print.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int format_binary(
336336
"delta" : "literal";
337337
const char *scan, *end;
338338

339-
git_buf_printf(pi->buf, "%s %lu\n", typename, inflatedlen);
339+
git_buf_printf(pi->buf, "%s %" PRIuZ "\n", typename, inflatedlen);
340340
pi->line.num_lines++;
341341

342342
for (scan = data, end = data + datalen; scan < end; ) {

src/transports/winhttp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ static int winhttp_stream_write_chunked(
10961096
size_t len)
10971097
{
10981098
winhttp_stream *s = (winhttp_stream *)stream;
1099-
winhttp_subtransport *t = OWNING_SUBTRANSPORT(s);
11001099
int error;
11011100

11021101
if (!s->request && winhttp_stream_connect(s) < 0)

src/unix/posix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <dirent.h>
1212
#include <sys/param.h>
1313
#include <sys/time.h>
14+
#include <sys/stat.h>
1415

1516
typedef int GIT_SOCKET;
1617
#define INVALID_SOCKET -1

tests/checkout/conflict.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ static void ensure_workdir_oid(const char *path, const char *oid_str)
161161

162162
static void ensure_workdir_mode(const char *path, int mode)
163163
{
164-
#ifndef GIT_WIN32
164+
#ifdef GIT_WIN32
165+
GIT_UNUSED(path);
166+
GIT_UNUSED(mode);
167+
#else
165168
git_buf fullpath = GIT_BUF_INIT;
166169
struct stat st;
167170

tests/index/addall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,4 +443,4 @@ void test_index_addall__removes_deleted_conflicted_files(void)
443443
git_annotated_commit_free(annotated);
444444
git_reference_free(ref);
445445
git_index_free(index);
446-
}
446+
}

0 commit comments

Comments
 (0)