]> granicus.if.org Git - vim/commitdiff
patch 8.2.4032: ATTRIBUTE_NORETURN is not needed v8.2.4032
authorichizok <gclient.gaap@gmail.com>
Fri, 7 Jan 2022 20:01:07 +0000 (20:01 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 7 Jan 2022 20:01:07 +0000 (20:01 +0000)
Problem:    ATTRIBUTE_NORETURN is not needed.
Solution:   Use NORETURN(). (Ozaki Kiichi, closes #9487)

src/if_ruby.c
src/version.c
src/vim.h

index fcbbf336e77a7a80c59a94f5f66a352b03462dd9..c58c3c5f1362afe92bc5aa266adeabb319ddf1f4 100644 (file)
@@ -502,7 +502,11 @@ static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
 #  endif
 # endif
 # if RUBY_VERSION >= 31
-static void (*dll_rb_unexpected_type) (VALUE, int) ATTRIBUTE_NORETURN;
+#  ifdef _MSC_VER
+static void (*dll_rb_unexpected_type) (VALUE, int);
+#  else
+NORETURN(static void (*dll_rb_unexpected_type) (VALUE, int));
+#  endif
 # endif
 # if RUBY_VERSION >= 18
 static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
index cc9d81ea2b2325d531189864e3c8647b359b14eb..78f1f2dec76e13a83d28f64c8e111d6cf783746c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4032,
 /**/
     4031,
 /**/
index 87fdbb1730436959acf55c89f07791a56f11cf34..5d8f32e4990751da279797909ca73b7b53edceb4 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -2178,15 +2178,13 @@ typedef struct stat stat_T;
 #endif
 
 #if defined(__GNUC__) || defined(__clang__)
-# define likely(x)             __builtin_expect((x), 1)
-# define unlikely(x)           __builtin_expect((x), 0)
-# define ATTRIBUTE_COLD                __attribute__((cold))
-# define ATTRIBUTE_NORETURN    __attribute__((noreturn))
+# define likely(x)     __builtin_expect((x), 1)
+# define unlikely(x)   __builtin_expect((x), 0)
+# define ATTRIBUTE_COLD        __attribute__((cold))
 #else
 # define unlikely(x)   (x)
 # define likely(x)     (x)
 # define ATTRIBUTE_COLD
-# define ATTRIBUTE_NORETURN
 #endif
 
 typedef enum {