diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-16 14:32:15 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-16 14:32:15 -0800 |
commit | c0d6cdd45edfcef257bc70776167b51c0f8b53d2 (patch) | |
tree | 9e957fd4960c86f7342a6a2214b86b2eab77fc74 /expand.c | |
parent | [PATCH] skip already evaluated symbols (diff) | |
download | sparse-c0d6cdd45edfcef257bc70776167b51c0f8b53d2.tar.gz sparse-c0d6cdd45edfcef257bc70776167b51c0f8b53d2.tar.bz2 sparse-c0d6cdd45edfcef257bc70776167b51c0f8b53d2.zip |
Re-name "error()" function to "sparse_error()"
Mitesh Shah (and others) report that broken libc's will have their own
"error()" that the sparse naming clashes with.
So use a sed-script to rewrite all the occurrences.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -761,7 +761,7 @@ static int expand_call(struct expression *expr) cost = expand_arguments(expr->args); sym = fn->ctype; if (!sym) { - error(expr->pos, "function has no type"); + sparse_error(expr->pos, "function has no type"); return SIDE_EFFECTS; } if (sym->type == SYM_NODE) @@ -948,7 +948,7 @@ static int expand_expression(struct expression *expr) case EXPR_SIZEOF: case EXPR_PTRSIZEOF: case EXPR_ALIGNOF: - error(expr->pos, "internal front-end error: sizeof in expansion?"); + sparse_error(expr->pos, "internal front-end error: sizeof in expansion?"); return UNSAFE; } return SIDE_EFFECTS; @@ -959,7 +959,7 @@ static void expand_const_expression(struct expression *expr, const char *where) if (expr) { expand_expression(expr); if (expr->type != EXPR_VALUE) - error(expr->pos, "Expected constant expression in %s", where); + sparse_error(expr->pos, "Expected constant expression in %s", where); } } @@ -1131,12 +1131,12 @@ long long get_expression_value(struct expression *expr) return 0; ctype = evaluate_expression(expr); if (!ctype) { - error(expr->pos, "bad constant expression type"); + sparse_error(expr->pos, "bad constant expression type"); return 0; } expand_expression(expr); if (expr->type != EXPR_VALUE) { - error(expr->pos, "bad constant expression"); + sparse_error(expr->pos, "bad constant expression"); return 0; } |