/[tinycc]/tinycc/tcc.c
ViewVC logotype

Diff of /tinycc/tcc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.143 by bellard, Fri Sep 19 20:35:50 2003 UTC revision 1.144 by bellard, Sat Oct 4 13:04:47 2003 UTC
# Line 408  struct TCCState { Line 408  struct TCCState {
408      int warn_write_strings;      int warn_write_strings;
409      int warn_unsupported;      int warn_unsupported;
410      int warn_error;      int warn_error;
411            int warn_none;
412    
413      /* error handling */      /* error handling */
414      void *error_opaque;      void *error_opaque;
415      void (*error_func)(void *opaque, const char *msg);      void (*error_func)(void *opaque, const char *msg);
# Line 1238  void warning(const char *fmt, ...) Line 1239  void warning(const char *fmt, ...)
1239      TCCState *s1 = tcc_state;      TCCState *s1 = tcc_state;
1240      va_list ap;      va_list ap;
1241    
1242        if (s1->warn_none)
1243            return;
1244    
1245      va_start(ap, fmt);      va_start(ap, fmt);
1246      error1(s1, 1, fmt, ap);      error1(s1, 1, fmt, ap);
1247      va_end(ap);      va_end(ap);
# Line 9551  int tcc_set_warning(TCCState *s, const c Line 9555  int tcc_set_warning(TCCState *s, const c
9555    
9556  #if !defined(LIBTCC)  #if !defined(LIBTCC)
9557    
 static void tcc_reset_warnings(TCCState *s)  
 {  
     int i;  
     const WarningDef *p;  
   
     for(i = 0, p = warning_defs; i < countof(warning_defs); i++, p++) {  
         *(int *)((uint8_t *)s + p->offset) = 0;  
     }  
 }  
   
9558  /* extract the basename of a file */  /* extract the basename of a file */
9559  static const char *tcc_basename(const char *name)  static const char *tcc_basename(const char *name)
9560  {  {
# Line 9872  int main(int argc, char **argv) Line 9866  int main(int argc, char **argv)
9866                  }                  }
9867                  break;                  break;
9868              case TCC_OPTION_w:              case TCC_OPTION_w:
9869                  tcc_reset_warnings(s);                  s->warn_none = 1;
9870                  break;                  break;
9871              case TCC_OPTION_rdynamic:              case TCC_OPTION_rdynamic:
9872                  s->rdynamic = 1;                  s->rdynamic = 1;

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26