pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.635 2008/01/04 11:33:02 grubba Exp $ + || $Id: program.c,v 1.636 2008/01/05 20:08:12 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:8256: Inside #if 1
   !(Pike_compiler->compiler_frame->variable[level].flags &    LOCAL_VAR_IS_USED)) {    struct pike_string *save_file = lex.current_file;    int save_line = lex.current_line;    lex.current_file = Pike_compiler->compiler_frame->variable[level].file;    lex.current_line = Pike_compiler->compiler_frame->variable[level].line;    yywarning("Unused local variable %S.",    Pike_compiler->compiler_frame->variable[level].name);    lex.current_file = save_file;    lex.current_line = save_line; +  /* Make sure we only warn once... */ +  Pike_compiler->compiler_frame->variable[level].flags |= +  LOCAL_VAR_IS_USED;    }    free_string(Pike_compiler->compiler_frame->variable[level].name);    copy_shared_string(Pike_compiler->compiler_frame->variable[level].name,    empty_pike_string);    /* FIXME: Do we need to keep the filenames? */    }    }   #endif    low_pop_local_variables(level);   }