Add a couple of casts to scan_thread_data () to shut GCC up.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Mon, 21 Oct 2013 19:33:59 +0000 (21:33 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Mon, 21 Oct 2013 21:10:15 +0000 (23:10 +0200)
This would result in the following warnings on e.g. PowerPC:

sgen-gc.c: In function 'scan_thread_data':
sgen-gc.c:4045:6: warning: passing argument 1 of 'conservatively_pin_objects_from' from incompatible pointer type [enabled by default]
sgen-gc.c:1467:1: note: expected 'void **' but argument is of type 'void * (*)[32]'
sgen-gc.c:4045:6: warning: passing argument 2 of 'conservatively_pin_objects_from' from incompatible pointer type [enabled by default]
sgen-gc.c:1467:1: note: expected 'void **' but argument is of type 'void * (*)[32]'

mono/metadata/sgen-gc.c

index 2afe16a68c21589a9339e91d2a7bf7a11efc5f3d..da89a5f74f50175b016ef0fc6c731bb587ba7b1c 100644 (file)
@@ -4043,7 +4043,7 @@ scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise, Gray
                        conservatively_pin_objects_from ((void**)&info->ctx, (void**)&info->ctx + ARCH_NUM_REGS,
                                start_nursery, end_nursery, PIN_TYPE_STACK);
 #else
-                       conservatively_pin_objects_from (&info->regs, &info->regs + ARCH_NUM_REGS,
+                       conservatively_pin_objects_from ((void**)&info->regs, (void**)&info->regs + ARCH_NUM_REGS,
                                        start_nursery, end_nursery, PIN_TYPE_STACK);
 #endif
                }