]> granicus.if.org Git - gc/commitdiff
Fix 'context local variable might be clobbered by setjmp' compiler warning
authorIvan Maidanski <ivmai@mail.ru>
Mon, 5 Dec 2016 23:21:33 +0000 (02:21 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 18:56:28 +0000 (21:56 +0300)
* mach_dep.c (GC_with_callee_saves_pushed): Mark "context" local
variable as volatile (to prevent it from potential clobbering).

mach_dep.c

index 9edf333c22a6a9e067aee41efcb0a73fb9f60375..c6ffa74e58e51d13eeb1d0a4649d9843570aaa7e 100644 (file)
@@ -214,7 +214,7 @@ GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
                                           volatile ptr_t arg)
 {
   volatile int dummy;
-  void * context = 0;
+  void * volatile context = 0;
 
 # if defined(HAVE_PUSH_REGS)
     GC_push_regs();