summaryrefslogtreecommitdiffstats
path: root/src/vim.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vim.h b/src/vim.h
index bd25165e56..1d479c6925 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -229,8 +229,10 @@
// Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
// can be used to check for mistakes.
-#ifdef HAVE_ATTRIBUTE_UNUSED
-# define UNUSED __attribute__((unused))
+#if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
+# if !defined(UNUSED)
+# define UNUSED __attribute__((unused))
+# endif
#else
# define UNUSED
#endif