]> granicus.if.org Git - gc/commitdiff
Fix 'arg parameter might be clobbered by setjmp' compiler warning
authorIvan Maidanski <ivmai@mail.ru>
Fri, 1 Jul 2016 07:41:16 +0000 (10:41 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 1 Jul 2016 07:41:16 +0000 (10:41 +0300)
* mach_dep.c (GC_with_callee_saves_pushed): Make "arg" parameter
volatile (to prevent it from potential clobbering).

mach_dep.c

index 29e0b8a72b44ac33a0c2ec2046e7b7261d737d57..0515a53121d9800afc7bb794b10ff52a8d97260a 100644 (file)
 /* are somewhere on the stack, and then call fn(arg, ctxt).             */
 /* ctxt is either a pointer to a ucontext_t we generated, or NULL.      */
 GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
-                                          ptr_t arg)
+                                          volatile ptr_t arg)
 {
     volatile int dummy;
     void * context = 0;