Fix 'variable unused' warning in GC_save_callers
authorIvan Maidanski <ivmai@mail.ru>
Sat, 14 Jun 2014 15:55:15 +0000 (19:55 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 14 Jun 2014 15:55:15 +0000 (19:55 +0400)
* os_dep.c (GC_save_callers): Do not declare "i" local variable unless
it is used.

os_dep.c

index 0bd0b50..b23644c 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -4585,8 +4585,10 @@ GC_INNER void GC_save_callers(struct callinfo info[NFRAMES])
    for (; !((word)fp HOTTER_THAN (word)frame)
           && !((word)GC_stackbottom HOTTER_THAN (word)fp)
           && nframes < NFRAMES;
-       fp = (struct frame *)((long) fp -> FR_SAVFP + BIAS), nframes++) {
-      register int i;
+        fp = (struct frame *)((long) fp -> FR_SAVFP + BIAS), nframes++) {
+#     if NARGS > 0
+        register int i;
+#     endif
 
       info[nframes].ci_pc = fp->FR_SAVPC;
 #     if NARGS > 0