Re: [PATCH] Adjust sysrq_register_handler() to avoid an array subscript warning

2015-04-28 Thread Mathieu Poirier
On 28 April 2015 at 03:49, David Howells wrote: > sysrq_register_handler() iterates over platform_sysrq_reset_seq[] using > ARRAY_SIZE() on sysrq_reset_seq[] as a limit (indeed, the platform array is > expected to be shorter). gcc-5 spots the potential dereference beyond the end > of the array an

[PATCH] Adjust sysrq_register_handler() to avoid an array subscript warning

2015-04-28 Thread David Howells
sysrq_register_handler() iterates over platform_sysrq_reset_seq[] using ARRAY_SIZE() on sysrq_reset_seq[] as a limit (indeed, the platform array is expected to be shorter). gcc-5 spots the potential dereference beyond the end of the array and issues the following warnings: CC drivers/tty/s