mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 22:30:21 +01:00
Compiling kernel with -Warray-bounds throws below warning:
In function 'emulate_vsx_store':
warning: array subscript is above array bounds [-Warray-bounds]
buf.d[2] = byterev_8(reg->d[1]);
~~~~~^~~
buf.d[3] = byterev_8(reg->d[0]);
~~~~~^~~
Fix it by using temporary array variable 'union vsx_reg buf32[]' in
that code block. Also, with element_size = 32, 'union vsx_reg *reg'
is an array of size 2. So, use 'reg' as an array instead of pointer
in the same code block.
Fixes:
|
||
|---|---|---|
| .. | ||
| alloc.c | ||
| checksum_32.S | ||
| checksum_64.S | ||
| checksum_wrappers.c | ||
| code-patching.c | ||
| copy_32.S | ||
| copy_mc_64.S | ||
| copypage_64.S | ||
| copypage_power7.S | ||
| copyuser_64.S | ||
| copyuser_power7.S | ||
| crtsavres.S | ||
| div64.S | ||
| error-inject.c | ||
| feature-fixups-test.S | ||
| feature-fixups.c | ||
| hweight_64.S | ||
| inst.c | ||
| ldstfp.S | ||
| locks.c | ||
| Makefile | ||
| mem_64.S | ||
| memcmp_32.S | ||
| memcmp_64.S | ||
| memcpy_64.S | ||
| memcpy_power7.S | ||
| pmem.c | ||
| quad.S | ||
| rheap.c | ||
| sstep.c | ||
| string_32.S | ||
| string_64.S | ||
| string.S | ||
| strlen_32.S | ||
| test_code-patching.S | ||
| test_emulate_step_exec_instr.S | ||
| test_emulate_step.c | ||
| vmx-helper.c | ||
| xor_vmx_glue.c | ||
| xor_vmx.c | ||
| xor_vmx.h | ||