diff options
| author | Paul Eggert | 2017-06-12 10:38:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-06-12 10:39:15 -0700 |
| commit | 6b9618e81314fb43bde3c0a57bb3b701cdd0ee88 (patch) | |
| tree | e9a33533ca20970af6a542e08b0beb4b22775ba4 | |
| parent | d92599d3a99d6d63e8f3ab2068ef96a2299a722b (diff) | |
| download | emacs-6b9618e81314fb43bde3c0a57bb3b701cdd0ee88.tar.gz emacs-6b9618e81314fb43bde3c0a57bb3b701cdd0ee88.zip | |
_Noreturn not noreturn
_Noreturn is more portable to non-C11 platforms. See:
https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
* src/emacs-module.c: Use _Noreturn, not noreturn. No need to
include <stdnoreturn.h>. Reindent to fit in 80 columns.
| -rw-r--r-- | src/emacs-module.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 05ff9714ade..9be481a271e 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | #include <stddef.h> | 25 | #include <stddef.h> |
| 26 | #include <stdint.h> | 26 | #include <stdint.h> |
| 27 | #include <stdio.h> | 27 | #include <stdio.h> |
| 28 | #include <stdnoreturn.h> | ||
| 29 | 28 | ||
| 30 | #include "lisp.h" | 29 | #include "lisp.h" |
| 31 | #include "dynlib.h" | 30 | #include "dynlib.h" |
| @@ -114,15 +113,19 @@ static enum emacs_funcall_exit module_non_local_exit_check (emacs_env *); | |||
| 114 | static void module_assert_thread (void); | 113 | static void module_assert_thread (void); |
| 115 | static void module_assert_runtime (struct emacs_runtime *); | 114 | static void module_assert_runtime (struct emacs_runtime *); |
| 116 | static void module_assert_env (emacs_env *); | 115 | static void module_assert_env (emacs_env *); |
| 117 | static noreturn void module_abort (const char *format, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2); | 116 | static _Noreturn void module_abort (const char *format, ...) |
| 118 | static emacs_env *initialize_environment (emacs_env *, struct emacs_env_private *); | 117 | ATTRIBUTE_FORMAT_PRINTF(1, 2); |
| 118 | static emacs_env *initialize_environment (emacs_env *, | ||
| 119 | struct emacs_env_private *); | ||
| 119 | static void finalize_environment (emacs_env *); | 120 | static void finalize_environment (emacs_env *); |
| 120 | static void finalize_environment_unwind (void *); | 121 | static void finalize_environment_unwind (void *); |
| 121 | static void finalize_runtime_unwind (void *); | 122 | static void finalize_runtime_unwind (void *); |
| 122 | static void module_handle_signal (emacs_env *, Lisp_Object); | 123 | static void module_handle_signal (emacs_env *, Lisp_Object); |
| 123 | static void module_handle_throw (emacs_env *, Lisp_Object); | 124 | static void module_handle_throw (emacs_env *, Lisp_Object); |
| 124 | static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object); | 125 | static void module_non_local_exit_signal_1 (emacs_env *, |
| 125 | static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object); | 126 | Lisp_Object, Lisp_Object); |
| 127 | static void module_non_local_exit_throw_1 (emacs_env *, | ||
| 128 | Lisp_Object, Lisp_Object); | ||
| 126 | static void module_out_of_memory (emacs_env *); | 129 | static void module_out_of_memory (emacs_env *); |
| 127 | static void module_reset_handlerlist (struct handler *const *); | 130 | static void module_reset_handlerlist (struct handler *const *); |
| 128 | 131 | ||
| @@ -345,7 +348,7 @@ module_free_global_ref (emacs_env *env, emacs_value ref) | |||
| 345 | ++count; | 348 | ++count; |
| 346 | prev = globals; | 349 | prev = globals; |
| 347 | } | 350 | } |
| 348 | module_abort ("Global value was not found in list of %" pD "d globals", | 351 | module_abort ("Global value was not found in list of %"pD"d globals", |
| 349 | count); | 352 | count); |
| 350 | } | 353 | } |
| 351 | } | 354 | } |
| @@ -827,7 +830,7 @@ module_assert_runtime (struct emacs_runtime *ert) | |||
| 827 | return; | 830 | return; |
| 828 | ++count; | 831 | ++count; |
| 829 | } | 832 | } |
| 830 | module_abort ("Runtime pointer not found in list of %" pD "d runtimes", | 833 | module_abort ("Runtime pointer not found in list of %"pD"d runtimes", |
| 831 | count); | 834 | count); |
| 832 | } | 835 | } |
| 833 | 836 | ||
| @@ -844,7 +847,7 @@ module_assert_env (emacs_env *env) | |||
| 844 | return; | 847 | return; |
| 845 | ++count; | 848 | ++count; |
| 846 | } | 849 | } |
| 847 | module_abort ("Environment pointer not found in list of %" pD "d environments", | 850 | module_abort ("Environment pointer not found in list of %"pD"d environments", |
| 848 | count); | 851 | count); |
| 849 | } | 852 | } |
| 850 | 853 | ||
| @@ -963,7 +966,8 @@ value_to_lisp (emacs_value v) | |||
| 963 | } | 966 | } |
| 964 | ++num_environments; | 967 | ++num_environments; |
| 965 | } | 968 | } |
| 966 | module_abort ("Emacs value not found in %" pD "d values of %" pD "d environments", | 969 | module_abort (("Emacs value not found in %"pD"d values " |
| 970 | "of %"pD"d environments"), | ||
| 967 | num_values, num_environments); | 971 | num_values, num_environments); |
| 968 | } | 972 | } |
| 969 | 973 | ||
| @@ -1178,7 +1182,7 @@ init_module_assertions (bool enable) | |||
| 1178 | } | 1182 | } |
| 1179 | } | 1183 | } |
| 1180 | 1184 | ||
| 1181 | static noreturn void | 1185 | static _Noreturn void |
| 1182 | ATTRIBUTE_FORMAT_PRINTF(1, 2) | 1186 | ATTRIBUTE_FORMAT_PRINTF(1, 2) |
| 1183 | module_abort (const char *format, ...) | 1187 | module_abort (const char *format, ...) |
| 1184 | { | 1188 | { |