diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-21 12:28:31 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-23 01:40:31 +0200 |
| commit | 9473e0a28653732de602faa35d089d1a2439780e (patch) | |
| tree | 6d52b34d6817216132e5396a4053ff65171ec0a1 /validation | |
| parent | efdefb100d086aaabf20d475c3d1a65cbceeb534 (diff) | |
| download | sparse-dev-9473e0a28653732de602faa35d089d1a2439780e.tar.gz | |
big-shift: do not truncate the count when checking it
The function check_shift_count() is used to check the validity
of shift counts but the count is truncated to an (host) int.
This truncated value can thus miss very large (or very negative)
shift count.
Fix this by using the full width shift count when doing the check.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/shift-undef-long.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/shift-undef-long.c b/validation/shift-undef-long.c index 50fcd98e..32626743 100644 --- a/validation/shift-undef-long.c +++ b/validation/shift-undef-long.c @@ -11,7 +11,6 @@ static unsigned very_big_shift(unsigned int a) /* * check-name: shift-undef-long * check-command: sparse -m64 $file - * check-known-to-fail * * check-error-start shift-undef-long.c:4:16: warning: shift too big (4294967295) for type unsigned int |
