]> git.baikalelectronics.ru Git - kernel.git/commitdiff
lib/decompressors: remove set but not used variabled 'level'
authorYu Kuai <yukuai3@huawei.com>
Thu, 1 Jul 2021 01:57:06 +0000 (18:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Jul 2021 18:06:06 +0000 (11:06 -0700)
Fixes gcc '-Wunused-but-set-variable' warning:

lib/decompress_unlzo.c:46:5: warning: variable `level' set but
not used [-Wunused-but-set-variable]

It is never used and so can be removed.

[akpm@linux-foundation.org: warning: value computed is not used]

Link: https://lkml.kernel.org/r/20210514062050.3532344-1-yukuai3@huawei.com
Fixes: f931b0b8eeb6 ("lib: add support for LZO-compressed kernels")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/decompress_unlzo.c

index 1f439a622076c10d9641ff4173162aea799da33b..64c1358500ce4e9cd274cce2ed43744fdb938406 100644 (file)
@@ -43,7 +43,6 @@ STATIC inline long INIT parse_header(u8 *input, long *skip, long in_len)
        int l;
        u8 *parse = input;
        u8 *end = input + in_len;
-       u8 level = 0;
        u16 version;
 
        /*
@@ -65,7 +64,7 @@ STATIC inline long INIT parse_header(u8 *input, long *skip, long in_len)
        version = get_unaligned_be16(parse);
        parse += 7;
        if (version >= 0x0940)
-               level = *parse++;
+               parse++;
        if (get_unaligned_be32(parse) & HEADER_HAS_FILTER)
                parse += 8; /* flags + filter info */
        else