mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-04 21:46:22 +00:00
Fix Windows warnings
This fixes problems with missing function prototypes and 64-bit data issues on Windows.
This commit is contained in:
parent
88c401bec8
commit
37f66e8263
@ -154,7 +154,7 @@ static int find_internal_file_by_level(
|
|||||||
} else {
|
} else {
|
||||||
git_vector_foreach(&cfg->files, i, internal) {
|
git_vector_foreach(&cfg->files, i, internal) {
|
||||||
if (internal->level == level)
|
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) {
|
git_vector_foreach(&cfg->files, i, internal) {
|
||||||
if (internal->level == level)
|
if (internal->level == level)
|
||||||
pos = i;
|
pos = (int)i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos == -1)
|
if (pos == -1)
|
||||||
|
@ -331,7 +331,7 @@ int git_diff_driver_content_is_binary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int diff_context_line__simple(
|
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(driver);
|
||||||
GIT_UNUSED(line_len);
|
GIT_UNUSED(line_len);
|
||||||
@ -339,7 +339,7 @@ static int diff_context_line__simple(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int diff_context_line__pattern_match(
|
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;
|
size_t i;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ typedef long (*git_diff_find_context_fn)(
|
|||||||
const char *, long, char *, long, void *);
|
const char *, long, char *, long, void *);
|
||||||
|
|
||||||
typedef int (*git_diff_find_context_line)(
|
typedef int (*git_diff_find_context_line)(
|
||||||
git_diff_driver *, const char *, long);
|
git_diff_driver *, const char *, size_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
git_diff_driver *driver;
|
git_diff_driver *driver;
|
||||||
|
@ -711,7 +711,7 @@ int git_diff_find_similar(
|
|||||||
git_vector_foreach(&diff->deltas, i, to) {
|
git_vector_foreach(&diff->deltas, i, to) {
|
||||||
size_t tried_sources = 0;
|
size_t tried_sources = 0;
|
||||||
|
|
||||||
match_targets[i].idx = i;
|
match_targets[i].idx = (uint32_t)i;
|
||||||
match_targets[i].similarity = 0;
|
match_targets[i].similarity = 0;
|
||||||
|
|
||||||
/* skip things that are not rename targets */
|
/* skip things that are not rename targets */
|
||||||
@ -744,8 +744,8 @@ int git_diff_find_similar(
|
|||||||
match_sources[j].similarity < (uint32_t)similarity) {
|
match_sources[j].similarity < (uint32_t)similarity) {
|
||||||
match_targets[i].similarity = (uint32_t)similarity;
|
match_targets[i].similarity = (uint32_t)similarity;
|
||||||
match_sources[j].similarity = (uint32_t)similarity;
|
match_sources[j].similarity = (uint32_t)similarity;
|
||||||
match_targets[i].idx = j;
|
match_targets[i].idx = (uint32_t)j;
|
||||||
match_sources[j].idx = i;
|
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(
|
int revparse__ext(
|
||||||
git_object **object_out,
|
git_object **object_out,
|
||||||
git_reference **reference_out,
|
git_reference **reference_out,
|
||||||
int *identifier_len_out,
|
size_t *identifier_len_out,
|
||||||
git_repository *repo,
|
git_repository *repo,
|
||||||
const char *spec)
|
const char *spec)
|
||||||
{
|
{
|
||||||
@ -832,7 +832,8 @@ int git_revparse_ext(
|
|||||||
git_repository *repo,
|
git_repository *repo,
|
||||||
const char *spec)
|
const char *spec)
|
||||||
{
|
{
|
||||||
int error, identifier_len;
|
int error;
|
||||||
|
size_t identifier_len;
|
||||||
git_object *obj = NULL;
|
git_object *obj = NULL;
|
||||||
git_reference *ref = NULL;
|
git_reference *ref = NULL;
|
||||||
|
|
||||||
@ -841,6 +842,7 @@ int git_revparse_ext(
|
|||||||
|
|
||||||
*object_out = obj;
|
*object_out = obj;
|
||||||
*reference_out = ref;
|
*reference_out = ref;
|
||||||
|
GIT_UNUSED(identifier_len);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#include <winhttp.h>
|
#include <winhttp.h>
|
||||||
#pragma comment(lib, "winhttp")
|
#pragma comment(lib, "winhttp")
|
||||||
|
|
||||||
|
#include <strsafe.h>
|
||||||
|
|
||||||
/* For UuidCreate */
|
/* For UuidCreate */
|
||||||
#pragma comment(lib, "rpcrt4")
|
#pragma comment(lib, "rpcrt4")
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* a Linking Exception. For full terms see the included COPYING file.
|
* a Linking Exception. For full terms see the included COPYING file.
|
||||||
*/
|
*/
|
||||||
#include "../posix.h"
|
#include "../posix.h"
|
||||||
|
#include "../fileops.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "utf-conv.h"
|
#include "utf-conv.h"
|
||||||
#include "repository.h"
|
#include "repository.h"
|
||||||
|
@ -66,7 +66,7 @@ void test_refs_iterator__list(void)
|
|||||||
} while (!error);
|
} while (!error);
|
||||||
|
|
||||||
git_reference_iterator_free(iter);
|
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);
|
git_vector_sort(&output);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user