Commit 3b5001b4 by Russell Belfer

Merge pull request #1647 from arrbee/fix-win32-warnings-part-112

Fix Windows warnings and missing prototypes
parents 88c401be 37f66e82
......@@ -154,7 +154,7 @@ static int find_internal_file_by_level(
} else {
git_vector_foreach(&cfg->files, i, internal) {
if (internal->level == level)
pos = i;
pos = (int)i;
}
}
......@@ -189,7 +189,7 @@ static void try_remove_existing_file_internal(
git_vector_foreach(&cfg->files, i, internal) {
if (internal->level == level)
pos = i;
pos = (int)i;
}
if (pos == -1)
......
......@@ -331,7 +331,7 @@ int git_diff_driver_content_is_binary(
}
static int diff_context_line__simple(
git_diff_driver *driver, const char *line, long line_len)
git_diff_driver *driver, const char *line, size_t line_len)
{
GIT_UNUSED(driver);
GIT_UNUSED(line_len);
......@@ -339,7 +339,7 @@ static int diff_context_line__simple(
}
static int diff_context_line__pattern_match(
git_diff_driver *driver, const char *line, long line_len)
git_diff_driver *driver, const char *line, size_t line_len)
{
size_t i;
......
......@@ -31,7 +31,7 @@ typedef long (*git_diff_find_context_fn)(
const char *, long, char *, long, void *);
typedef int (*git_diff_find_context_line)(
git_diff_driver *, const char *, long);
git_diff_driver *, const char *, size_t);
typedef struct {
git_diff_driver *driver;
......
......@@ -711,7 +711,7 @@ int git_diff_find_similar(
git_vector_foreach(&diff->deltas, i, to) {
size_t tried_sources = 0;
match_targets[i].idx = i;
match_targets[i].idx = (uint32_t)i;
match_targets[i].similarity = 0;
/* skip things that are not rename targets */
......@@ -744,8 +744,8 @@ int git_diff_find_similar(
match_sources[j].similarity < (uint32_t)similarity) {
match_targets[i].similarity = (uint32_t)similarity;
match_sources[j].similarity = (uint32_t)similarity;
match_targets[i].idx = j;
match_sources[j].idx = i;
match_targets[i].idx = (uint32_t)j;
match_sources[j].idx = (uint32_t)i;
}
}
}
......
......@@ -674,7 +674,7 @@ static int ensure_left_hand_identifier_is_not_known_yet(git_object *object, git_
int revparse__ext(
git_object **object_out,
git_reference **reference_out,
int *identifier_len_out,
size_t *identifier_len_out,
git_repository *repo,
const char *spec)
{
......@@ -832,7 +832,8 @@ int git_revparse_ext(
git_repository *repo,
const char *spec)
{
int error, identifier_len;
int error;
size_t identifier_len;
git_object *obj = NULL;
git_reference *ref = NULL;
......@@ -841,6 +842,7 @@ int git_revparse_ext(
*object_out = obj;
*reference_out = ref;
GIT_UNUSED(identifier_len);
return 0;
......
......@@ -19,6 +19,8 @@
#include <winhttp.h>
#pragma comment(lib, "winhttp")
#include <strsafe.h>
/* For UuidCreate */
#pragma comment(lib, "rpcrt4")
......
......@@ -5,6 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "../posix.h"
#include "../fileops.h"
#include "path.h"
#include "utf-conv.h"
#include "repository.h"
......
......@@ -66,7 +66,7 @@ void test_refs_iterator__list(void)
} while (!error);
git_reference_iterator_free(iter);
cl_assert_equal_i(output.length, ARRAY_SIZE(refnames));
cl_assert_equal_sz(output.length, ARRAY_SIZE(refnames));
git_vector_sort(&output);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment