Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbeABL3U (ORCPT + 1 other); Tue, 2 Jan 2018 06:29:20 -0500 Received: from mail-yb0-f194.google.com ([209.85.213.194]:40110 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbeABL3S (ORCPT ); Tue, 2 Jan 2018 06:29:18 -0500 X-Google-Smtp-Source: ACJfBouK3ewI6ilwVDyGZfcVYleUoHOUxntxtxdl9/3qb0ftxhNu6bL7b5WVMkm6mOcjUckUzqp/T9mzYzu7mPiUVsY= MIME-Version: 1.0 In-Reply-To: <20180102110035.1806925-1-arnd@arndb.de> References: <20180102110035.1806925-1-arnd@arndb.de> From: Max Filippov Date: Tue, 2 Jan 2018 03:29:17 -0800 Message-ID: Subject: Re: [PATCH] xtensa: shut up gcc-8 warnings To: Arnd Bergmann Cc: Andrew Morton , Chris Zankel , Linux-Arch , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 warning by turning the pointer arithmetic into an > integer operation that does not get checked the same way. > > Signed-off-by: Arnd Bergmann > --- > arch/xtensa/include/asm/string.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, applied to my xtensa tree. -- Max