From: Linus Torvalds Date: Sun, 19 Apr 2015 20:48:40 +0000 (-0700) Subject: hexdump: avoid warning in test function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17974c054db3030b714b7108566bf5208d965a19;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git hexdump: avoid warning in test function The test_data_1_le[] array is a const array of const char *. To avoid dropping any const information, we need to use "const char * const *", not just "const char **". I'm not sure why the different test arrays end up having different const'ness, but let's make the pointer we use to traverse them as const as possible, since we modify neither the array of pointers _or_ the pointers we find in the array. Signed-off-by: Linus Torvalds --- diff --git a/lib/test-hexdump.c b/lib/test-hexdump.c index 9846ff7428b3..c227cc43ec0a 100644 --- a/lib/test-hexdump.c +++ b/lib/test-hexdump.c @@ -48,7 +48,7 @@ static void __init test_hexdump(size_t len, int rowsize, int groupsize, char test[32 * 3 + 2 + 32 + 1]; char real[32 * 3 + 2 + 32 + 1]; char *p; - const char **result; + const char * const *result; size_t l = len; int gs = groupsize, rs = rowsize; unsigned int i;