diff options
| author | Paul Eggert | 2017-05-18 20:02:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-18 20:03:03 -0700 |
| commit | 9647430ae8744bd4dee29f1269b74f65c09274d2 (patch) | |
| tree | 0a9702ce75ed859d59fa72720e3ee9ffadc6bfdd | |
| parent | e41030971f37375b9bb16c248f3b5d8d12064743 (diff) | |
| download | emacs-9647430ae8744bd4dee29f1269b74f65c09274d2.tar.gz emacs-9647430ae8744bd4dee29f1269b74f65c09274d2.zip | |
Clean up compiler warning in emacs-module.c
* src/emacs-module.c (MODULE_SETJMP_1): Use the local var
instead of leaving it unused, to pacify picky compilers.
(module_reset_handlerlist): Now takes a dummy pointer to a struct
handler *, instead of a dummy pointer to an int. All uses changed.
| -rw-r--r-- | src/emacs-module.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index cd025a1396e..5aa8a881745 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -109,7 +109,7 @@ static void module_handle_throw (emacs_env *, Lisp_Object); | |||
| 109 | static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object); | 109 | static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object); |
| 110 | static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object); | 110 | static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object); |
| 111 | static void module_out_of_memory (emacs_env *); | 111 | static void module_out_of_memory (emacs_env *); |
| 112 | static void module_reset_handlerlist (const int *); | 112 | static void module_reset_handlerlist (struct handler *const *); |
| 113 | 113 | ||
| 114 | /* We used to return NULL when emacs_value was a different type from | 114 | /* We used to return NULL when emacs_value was a different type from |
| 115 | Lisp_Object, but nowadays we just use Qnil instead. Although they | 115 | Lisp_Object, but nowadays we just use Qnil instead. Although they |
| @@ -160,17 +160,18 @@ static emacs_value const module_nil = 0; | |||
| 160 | 160 | ||
| 161 | /* TODO: Make backtraces work if this macros is used. */ | 161 | /* TODO: Make backtraces work if this macros is used. */ |
| 162 | 162 | ||
| 163 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \ | 163 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c0, c) \ |
| 164 | if (module_non_local_exit_check (env) != emacs_funcall_exit_return) \ | 164 | if (module_non_local_exit_check (env) != emacs_funcall_exit_return) \ |
| 165 | return retval; \ | 165 | return retval; \ |
| 166 | struct handler *c = push_handler_nosignal (Qt, handlertype); \ | 166 | struct handler *c0 = push_handler_nosignal (Qt, handlertype); \ |
| 167 | if (!c) \ | 167 | if (!c0) \ |
| 168 | { \ | 168 | { \ |
| 169 | module_out_of_memory (env); \ | 169 | module_out_of_memory (env); \ |
| 170 | return retval; \ | 170 | return retval; \ |
| 171 | } \ | 171 | } \ |
| 172 | verify (module_has_cleanup); \ | 172 | verify (module_has_cleanup); \ |
| 173 | int dummy __attribute__ ((cleanup (module_reset_handlerlist))); \ | 173 | struct handler *c __attribute__ ((cleanup (module_reset_handlerlist))) \ |
| 174 | = c0; \ | ||
| 174 | if (sys_setjmp (c->jmp)) \ | 175 | if (sys_setjmp (c->jmp)) \ |
| 175 | { \ | 176 | { \ |
| 176 | (handlerfunc) (env, c->val); \ | 177 | (handlerfunc) (env, c->val); \ |
| @@ -919,7 +920,7 @@ finalize_environment (struct emacs_env_private *env) | |||
| 919 | code in eval.c for details. The macros below arrange for this | 920 | code in eval.c for details. The macros below arrange for this |
| 920 | function to be called automatically. DUMMY is ignored. */ | 921 | function to be called automatically. DUMMY is ignored. */ |
| 921 | static void | 922 | static void |
| 922 | module_reset_handlerlist (const int *dummy) | 923 | module_reset_handlerlist (struct handler *const *dummy) |
| 923 | { | 924 | { |
| 924 | handlerlist = handlerlist->next; | 925 | handlerlist = handlerlist->next; |
| 925 | } | 926 | } |