mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-29 12:19:39 +00:00
kasan: remove redundant initialization of variable 'real_size'
commit 48c2323954
upstream.
Variable real_size is initialized with a value that is never read, it is
re-assigned a new value later on, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
lib/test_kasan.c:422:21: warning: Value stored to 'real_size' during its initialization is never read
Link: http://lkml.kernel.org/r/20180206144950.32457-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8ce917131a
commit
13a1d1adad
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ static noinline void __init kasan_stack_oob(void)
|
|||
static noinline void __init ksize_unpoisons_memory(void)
|
||||
{
|
||||
char *ptr;
|
||||
size_t size = 123, real_size = size;
|
||||
size_t size = 123, real_size;
|
||||
|
||||
pr_info("ksize() unpoisons the whole allocated chunk\n");
|
||||
ptr = kmalloc(size, GFP_KERNEL);
|
||||
|
|
Loading…
Reference in a new issue