diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cc-compat.h | 6 | ||||
-rw-r--r-- | src/fileops.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cc-compat.h b/src/cc-compat.h index aefe66d19..5071d5322 100644 --- a/src/cc-compat.h +++ b/src/cc-compat.h @@ -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> diff --git a/src/fileops.h b/src/fileops.h index c5c58a0da..53495ca95 100644 --- a/src/fileops.h +++ b/src/fileops.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); } |