Skip to content

Commit f536bf6

Browse files
committed
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)
1 parent fc6f16b commit f536bf6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/os_macosx.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
* os_macosx.m -- Mac specific things for Mac OS X.
1212
*/
1313

14+
/* Suppress compiler warnings to non-C89 code. */
15+
#if defined(__clang__) && defined(__STRICT_ANSI__)
16+
# pragma clang diagnostic push
17+
# pragma clang diagnostic ignored "-Wc99-extensions"
18+
# pragma clang diagnostic push
19+
# pragma clang diagnostic ignored "-Wdeclaration-after-statement"
20+
#endif
21+
1422
/* Avoid a conflict for the definition of Boolean between Mac header files and
1523
* X11 header files. */
1624
#define NO_X11_INCLUDES
@@ -189,3 +197,9 @@
189197
}
190198

191199
#endif /* FEAT_CLIPBOARD */
200+
201+
/* Lift the compiler warning suppression. */
202+
#if defined(__clang__) && defined(__STRICT_ANSI__)
203+
# pragma clang diagnostic pop
204+
# pragma clang diagnostic pop
205+
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ static char *(features[]) =
766766

767767
static int included_patches[] =
768768
{ /* Add new patch number below this line */
769+
/**/
770+
1584,
769771
/**/
770772
1583,
771773
/**/

0 commit comments

Comments
 (0)