aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorAlexander Viro <viro@www.linux.org.uk>2004-08-12 19:22:22 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:44 -0700
commit404a8fc038037d1775861b9f7c921ada7c91c7d6 (patch)
tree46f0f41b13ccd6742e1043e42c50e4424ff7993e
parent19bd5892d9664aea5e2d6c02c21342adbb91d998 (diff)
downloadsparse-dev-404a8fc038037d1775861b9f7c921ada7c91c7d6.tar.gz
[PATCH] fix double warnings in inline calls
Fix double warnings on type mismatch in inline arguments; once we'd got a warning, cast the damn thing and be done with that. Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index bcd0493a..8d6d4ff8 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -892,10 +892,10 @@ static int compatible_assignment_types(struct expression *expr, struct symbol *t
}
}
- // FIXME!! Cast it?
warn(expr->pos, "incorrect type in %s (%s)", where, typediff);
info(expr->pos, " expected %s", show_typename(target));
info(expr->pos, " got %s", show_typename(source));
+ *rp = cast_to(*rp, target);
return 0;
Cast:
*rp = cast_to(*rp, target);