From 7c54c1e62c68ead7b83e0d990be37930866db950 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 22 May 2013 11:59:15 +0300 Subject: [PATCH] sval: cast bitwise negates I'm not sure what changed but now it definitely causes a bug to not do not truncate u64max to u32max here. Signed-off-by: Dan Carpenter --- smatch_sval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_sval.c b/smatch_sval.c index 5a3711ea..d4c67dcb 100644 --- a/smatch_sval.c +++ b/smatch_sval.c @@ -307,7 +307,7 @@ sval_t sval_preop(sval_t sval, int op) break; case '~': sval.value = ~sval.value; - /* fixme: should probably cast this here */ + sval = sval_cast(sval.type, sval); break; case '-': sval.value = -sval.value; -- 2.11.4.GIT