aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-05-18 20:02:42 -0700
committerPaul Eggert2017-05-18 20:03:03 -0700
commit9647430ae8744bd4dee29f1269b74f65c09274d2 (patch)
tree0a9702ce75ed859d59fa72720e3ee9ffadc6bfdd /src
parente41030971f37375b9bb16c248f3b5d8d12064743 (diff)
downloademacs-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.
Diffstat (limited to 'src')
-rw-r--r--src/emacs-module.c13
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);
109static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object); 109static void module_non_local_exit_signal_1 (emacs_env *, Lisp_Object, Lisp_Object);
110static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object); 110static void module_non_local_exit_throw_1 (emacs_env *, Lisp_Object, Lisp_Object);
111static void module_out_of_memory (emacs_env *); 111static void module_out_of_memory (emacs_env *);
112static void module_reset_handlerlist (const int *); 112static 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. */
921static void 922static void
922module_reset_handlerlist (const int *dummy) 923module_reset_handlerlist (struct handler *const *dummy)
923{ 924{
924 handlerlist = handlerlist->next; 925 handlerlist = handlerlist->next;
925} 926}