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.661 2008/04/14 12:19:18 grubba Exp $ + || $Id: program.c,v 1.662 2008/04/14 13:18:09 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:8862:   void low_pop_local_variables(int level)   {    struct compilation *c = THIS_COMPILATION;    while(Pike_compiler->compiler_frame->current_number_of_locals > level)    {    int e;    e=--(Pike_compiler->compiler_frame->current_number_of_locals);    if ((Pike_compiler->compiler_pass == 2) &&    !(Pike_compiler->compiler_frame->variable[e].flags &    LOCAL_VAR_IS_USED)) { -  push_int(1); /* Warning */ +  push_int(REPORT_WARNING);    ref_push_string(Pike_compiler->compiler_frame->variable[e].file);    push_int(Pike_compiler->compiler_frame->variable[e].line);    push_constant_text("parse");    push_constant_text("Unused local variable %S.");    ref_push_string(Pike_compiler->compiler_frame->variable[e].name);    safe_apply_current(CE_REPORT_FUN_NUM, 6);    pop_stack();    }    free_string(Pike_compiler->compiler_frame->variable[e].name);    free_type(Pike_compiler->compiler_frame->variable[e].type);
pike.git/src/program.c:8894: Inside #if 1
   /* We need to save the variables Kuppo (but not their names) */    if(level < Pike_compiler->compiler_frame->min_number_of_locals)    {    /* FIXME: Consider using flags to indicate whether a local variable    * actually is used from a nested scope. */    for(;level<Pike_compiler->compiler_frame->min_number_of_locals;level++)    {    if ((Pike_compiler->compiler_pass == 2) &&    !(Pike_compiler->compiler_frame->variable[level].flags &    LOCAL_VAR_IS_USED)) { -  push_int(1); /* Warning */ +  push_int(REPORT_WARNING); /* Warning */    ref_push_string(Pike_compiler->compiler_frame->variable[level].file);    push_int(Pike_compiler->compiler_frame->variable[level].line);    push_constant_text("parse");    push_constant_text("Unused local variable %S.");    ref_push_string(Pike_compiler->compiler_frame->variable[level].name);    safe_apply_current(CE_REPORT_FUN_NUM, 6);    pop_stack();    /* Make sure we only warn once... */    Pike_compiler->compiler_frame->variable[level].flags |=    LOCAL_VAR_IS_USED;
pike.git/src/program.c:9130:    * visually locate the actual error message.    */    if (Pike_compiler->num_parse_error) return;       init_string_builder(&s, 0);    va_start(args,fmt);    string_builder_vsprintf(&s, fmt, args);    va_end(args);    msg = finish_string_builder(&s);    -  push_int(1); /* Warning. */ +  push_int(REPORT_WARNING);    ref_push_string(c->lex.current_file);    push_int(c->lex.current_line);    push_constant_text("parse");    push_string(msg);    safe_apply_current(CE_REPORT_FUN_NUM, 5);    pop_stack();   }