]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: Fix -Wstringop-overflow warning
authorOrlando Arias <oarias@knights.ucf.edu>
Tue, 16 May 2017 19:34:00 +0000 (15:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 May 2017 19:07:46 +0000 (12:07 -0700)
commit9582780dfd495adac762052f88a6c9e8025de274
tree90881a5181651c09e8fd8ceb9d62eb65bf556008
parent0fa48b0a1f997d33d9f0dbd208edc38fb21d7e3c
sparc: Fix -Wstringop-overflow warning

Greetings,

GCC 7 introduced the -Wstringop-overflow flag to detect buffer overflows
in calls to string handling functions [1][2]. Due to the way
``empty_zero_page'' is declared in arch/sparc/include/setup.h, this
causes a warning to trigger at compile time in the function mem_init(),
which is subsequently converted to an error. The ensuing patch fixes
this issue and aligns the declaration of empty_zero_page to that of
other architectures. Thank you.

Cheers,
Orlando.

[1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02308.html
[2] https://gcc.gnu.org/gcc-7/changes.html

Signed-off-by: Orlando Arias <oarias@knights.ucf.edu>
--------------------------------------------------------------------------------
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/setup.h
arch/sparc/mm/init_32.c