aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitesh Shah <mshah@teja.com>2005-09-21 11:53:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-22 11:37:53 -0700
commit2660f22e954dc95c3c113815c91c87f109cb8410 (patch)
tree48cad7724ccec4b7f59b29c67e9b95f02e004878 /symbol.c
parentAdd various declarations for more builtin functions (diff)
downloadsparse-2660f22e954dc95c3c113815c91c87f109cb8410.tar.gz
sparse-2660f22e954dc95c3c113815c91c87f109cb8410.tar.bz2
sparse-2660f22e954dc95c3c113815c91c87f109cb8410.zip
[PATCH] replaced warnings with errors.
This replaceq calls to warning() with error() at places where (I think) the gcc reports an error. Also added a global variable die_if_error which is set if there is one or more errors. If someone wants to stop processing further, can check for the variable. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/symbol.c b/symbol.c
index ccd93fa..cfb00e3 100644
--- a/symbol.c
+++ b/symbol.c
@@ -394,16 +394,16 @@ struct symbol *examine_symbol_type(struct symbol * sym)
break;
}
case SYM_PREPROCESSOR:
- warning(sym->pos, "ctype on preprocessor command? (%s)", show_ident(sym->ident));
+ error(sym->pos, "ctype on preprocessor command? (%s)", show_ident(sym->ident));
return NULL;
case SYM_UNINITIALIZED:
- warning(sym->pos, "ctype on uninitialized symbol %p", sym);
+ error(sym->pos, "ctype on uninitialized symbol %p", sym);
return NULL;
case SYM_RESTRICT:
examine_base_type(sym);
return sym;
default:
- warning(sym->pos, "Examining unknown symbol type %d", sym->type);
+ error(sym->pos, "Examining unknown symbol type %d", sym->type);
break;
}
return sym;
@@ -441,11 +441,11 @@ void bind_symbol(struct symbol *sym, struct ident *ident, enum namespace ns)
{
struct scope *scope;
if (sym->id_list) {
- warning(sym->pos, "internal error: symbol type already bound");
+ error(sym->pos, "internal error: symbol type already bound");
return;
}
if (ident->reserved && (ns & (NS_TYPEDEF | NS_STRUCT | NS_LABEL | NS_SYMBOL))) {
- warning(sym->pos, "Trying to use reserved word '%s' as identifier", show_ident(ident));
+ error(sym->pos, "Trying to use reserved word '%s' as identifier", show_ident(ident));
return;
}
sym->namespace = ns;