diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-19 16:48:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-19 16:48:40 -0400 |
commit | 17974c054db3030b714b7108566bf5208d965a19 (patch) | |
tree | 774debe2e203479832b2a2796faa8cd617d1c7ad /lib | |
parent | 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 (diff) |
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 <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test-hexdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
48 | char test[32 * 3 + 2 + 32 + 1]; | 48 | char test[32 * 3 + 2 + 32 + 1]; |
49 | char real[32 * 3 + 2 + 32 + 1]; | 49 | char real[32 * 3 + 2 + 32 + 1]; |
50 | char *p; | 50 | char *p; |
51 | const char **result; | 51 | const char * const *result; |
52 | size_t l = len; | 52 | size_t l = len; |
53 | int gs = groupsize, rs = rowsize; | 53 | int gs = groupsize, rs = rowsize; |
54 | unsigned int i; | 54 | unsigned int i; |