0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.1584: using C99 in Mac file gives compiler warning messages

Problem:    Using C99 in Mac file gives compiler warning messages.
Solution:   Add #prama's to avoid the warnings. (Kazunobu Kuriyama)
This commit is contained in:
Bram Moolenaar
2018-03-06 17:55:01 +01:00
parent fc6f16b57c
commit f536bf6d45
2 changed files with 16 additions and 0 deletions

View File

@@ -11,6 +11,14 @@
* os_macosx.m -- Mac specific things for Mac OS X. * os_macosx.m -- Mac specific things for Mac OS X.
*/ */
/* Suppress compiler warnings to non-C89 code. */
#if defined(__clang__) && defined(__STRICT_ANSI__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wc99-extensions"
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeclaration-after-statement"
#endif
/* Avoid a conflict for the definition of Boolean between Mac header files and /* Avoid a conflict for the definition of Boolean between Mac header files and
* X11 header files. */ * X11 header files. */
#define NO_X11_INCLUDES #define NO_X11_INCLUDES
@@ -189,3 +197,9 @@ releasepool:
} }
#endif /* FEAT_CLIPBOARD */ #endif /* FEAT_CLIPBOARD */
/* Lift the compiler warning suppression. */
#if defined(__clang__) && defined(__STRICT_ANSI__)
# pragma clang diagnostic pop
# pragma clang diagnostic pop
#endif

View File

@@ -766,6 +766,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1584,
/**/ /**/
1583, 1583,
/**/ /**/