From 06106028c1a3cbfae917fa7b18269824f4ff0e6d Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 15 Nov 2012 12:10:02 +0300 Subject: [PATCH] sval: signed: fix validation test and update format In the original it said that "if ((char)-1 == (unsigned int)-1) { ..." is never true, but actually it is. Also the format of the output has changed. Signed-off-by: Dan Carpenter --- validation/sm_casts2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validation/sm_casts2.c b/validation/sm_casts2.c index 03320734..d3057c15 100644 --- a/validation/sm_casts2.c +++ b/validation/sm_casts2.c @@ -5,7 +5,7 @@ unsigned int frob(); unsigned char *a; unsigned int *b; int *c; -char *****d; +unsigned char *****d; int main(void) { @@ -28,7 +28,7 @@ int main(void) * check-command: smatch sm_casts2.c * * check-output-start -sm_casts2.c:12 main() error: *a is never equal to max (wrong type 0 - 255). -sm_casts2.c:22 main() error: *****d is never equal to max (wrong type (-128) - 127). +sm_casts2.c:12 main() warn: impossible condition '(*a == -1) => (0-255 == u32max)' +sm_casts2.c:22 main() warn: impossible condition '(*****d == -1) => (0-255 == u32max)' * check-output-end */ -- 2.11.4.GIT