From: Ivan Maidanski Date: Sat, 14 Jun 2014 15:55:15 +0000 (+0400) Subject: Fix 'variable unused' warning in GC_save_callers X-Git-Tag: gc7_6_0~230 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=185027e9a4d9176197de1e462abda9a4c13002bd;p=gc Fix 'variable unused' warning in GC_save_callers * os_dep.c (GC_save_callers): Do not declare "i" local variable unless it is used. --- diff --git a/os_dep.c b/os_dep.c index 0bd0b50a..b23644ce 100644 --- 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