]> granicus.if.org Git - vim/commitdiff
patch 8.0.1584: using C99 in Mac file gives compiler warning messages v8.0.1584
authorBram Moolenaar <Bram@vim.org>
Tue, 6 Mar 2018 16:55:01 +0000 (17:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 6 Mar 2018 16:55:01 +0000 (17:55 +0100)
Problem:    Using C99 in Mac file gives compiler warning messages.
Solution:   Add #prama's to avoid the warnings. (Kazunobu Kuriyama)

src/os_macosx.m
src/version.c

index 6fd72fd28045a1e4d509a80789961b220c02280f..b0d29d947755437cafd6087f77bc2254dc497394 100644 (file)
  * 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
  * X11 header files. */
 #define NO_X11_INCLUDES
@@ -189,3 +197,9 @@ releasepool:
 }
 
 #endif /* FEAT_CLIPBOARD */
+
+/* Lift the compiler warning suppression. */
+#if defined(__clang__) && defined(__STRICT_ANSI__)
+# pragma clang diagnostic pop
+# pragma clang diagnostic pop
+#endif
index 40b161a14d47ada1dcb518cc5aa49b8be03c21f1..a2165f20e6bf04e344dc0510283207021128efef 100644 (file)
@@ -766,6 +766,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1584,
 /**/
     1583,
 /**/