Re: [PATCH] xtensa: shut up gcc-8 warnings

2018-01-02 Thread Max Filippov
On Tue, Jan 2, 2018 at 3:00 AM, Arnd Bergmann 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 warnin

[PATCH] xtensa: shut up gcc-8 warnings

2018-01-02 Thread Arnd Bergmann
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