lkml.org 
[lkml]   [2018]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] xtensa: shut up gcc-8 warnings
On Tue, Jan 2, 2018 at 3:00 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> Many uses of strncpy() on xtensa causes a warning like
>
> arch/xtensa/include/asm/string.h:56:42: warning: array subscript is above array bounds [-Warray-bounds]
> : "0" (__dest), "1" (__src), "r" (__src+__n)
>
> This avoids the warning by turning the pointer arithmetic into an
> integer operation that does not get checked the same way.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/xtensa/include/asm/string.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to my xtensa tree.

-- Max

\
 
 \ /
  Last update: 2018-01-02 12:30    [W:0.022 / U:43.592 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site