mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 02:16:21 +00:00
msvc: Fix some "unreferenced formal parameter" warnings
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
This commit is contained in:
parent
e8a952561c
commit
73dcf2876f
@ -40,6 +40,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define GIT_UNUSED_ARG(x) ((void)(x)); /* note trailing ; */
|
||||
#else
|
||||
#define GIT_UNUSED_ARG(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Does our compiler/platform support the C99 <inttypes.h> and
|
||||
* <stdint.h> header files. (C99 requires that <inttypes.h>
|
||||
|
@ -15,12 +15,15 @@
|
||||
#ifdef GIT_WIN32
|
||||
GIT_INLINE(int) link(const char *GIT_UNUSED(old), const char *GIT_UNUSED(new))
|
||||
{
|
||||
GIT_UNUSED_ARG(old)
|
||||
GIT_UNUSED_ARG(new)
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
GIT_INLINE(int) git__mkdir(const char *path, int GIT_UNUSED(mode))
|
||||
{
|
||||
GIT_UNUSED_ARG(mode)
|
||||
return mkdir(path);
|
||||
}
|
||||
|
||||
|
@ -186,6 +186,8 @@ static walk_data empty = {
|
||||
|
||||
static int dont_call_me(void *GIT_UNUSED(state), char *GIT_UNUSED(path))
|
||||
{
|
||||
GIT_UNUSED_ARG(state)
|
||||
GIT_UNUSED_ARG(path)
|
||||
test_die("dont_call_me: unexpected callback!");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user