Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1010512imp; Thu, 21 Feb 2019 16:25:15 -0800 (PST) X-Google-Smtp-Source: AHgI3Iblc0zxcHwpWIyGpJ9YXaodqm4JaigZXkBq84h4wVuI3LhFkstLnV6CpI8kkrFP8ZF+dzoJ X-Received: by 2002:a17:902:8e82:: with SMTP id bg2mr1291218plb.217.1550795115392; Thu, 21 Feb 2019 16:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550795115; cv=none; d=google.com; s=arc-20160816; b=ZCdgM3QL+O6C757z3GN+EqDqbprx8z0VVcSJ5dG18C3P6FaFrE7OPyGuot9IdAconw nYj5Yi10zRwYrKhxgmpGf20iY5huoDvravn0D/LedndW8Y6k15XDrlofg6Q0LqJu7zsv F4mrG4h6ipH+FlMPf52Nz51YkKbqFmgUZI/xaQQH49GXSk9miOPlU2lxG2IxNyccrcXs lB8gyqUP3/R9reWKMX66KJvmOdc0Hf2sOIGOwXxFN8xXlAl2HeLVu2Z/HaMrF8WCx6v0 q0GxgemER5tLOWOfbA3SJAzk1KxMc/Ndd1evty7BnwjxwSbGgFKyeeoVcwc3utIzgdRG m6dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=1yfecyWfgxPJGHVRn2zcFgxbJW5OaGBGPO2kZRM7S30=; b=BsgpU4Lls/wzsis4YuLdBIGZLIw40hAmzUTl6gTiEQeKeyxg/bPapci62b213upBgr 2q+3nLHquyoY5mBQwzhMbVMhEWFwMGi41RN+OR6/SCYVsBoJDn6CcR02WpKSmfrr9dO8 29rmazDNOVuVlouHa+4HVBIC1kMG0LU5/j4u+dRPXRpe3RkQF11A2sjxDh//g4QdHNlQ mHAAKKVrMmDEzWA3VS12SsnJ8R61lUEpr9tp56YSHxNxEsDcFrRqIkh9D3y9ghqFsRG5 roO3sWghu/AwPr1h2yrMWNNhIHbiV2LcsJAW+B0sMPz6d2q+c+RMK+n8trZSuo5B71Fp qZBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a63si321411pfb.267.2019.02.21.16.24.59; Thu, 21 Feb 2019 16:25:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbfBVAYL (ORCPT + 99 others); Thu, 21 Feb 2019 19:24:11 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:45250 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbfBVAYL (ORCPT ); Thu, 21 Feb 2019 19:24:11 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id C349E146A0D07; Thu, 21 Feb 2019 16:24:10 -0800 (PST) Date: Thu, 21 Feb 2019 16:24:10 -0800 (PST) Message-Id: <20190221.162410.1126816126933565769.davem@davemloft.net> To: arnd@arndb.de Cc: courmisch@gmail.com, natechancellor@gmail.com, remi@remlab.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] phonet: fix building with clang From: David Miller In-Reply-To: <20190219215359.391543-1-arnd@arndb.de> References: <20190219215359.391543-1-arnd@arndb.de> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 21 Feb 2019 16:24:11 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Tue, 19 Feb 2019 22:53:50 +0100 > clang warns about overflowing the data[] member in the struct pnpipehdr: > > net/phonet/pep.c:295:8: warning: array index 4 is past the end of the array (which contains 1 element) [-Warray-bounds] > if (hdr->data[4] == PEP_IND_READY) > ^ ~ > include/net/phonet/pep.h:66:3: note: array 'data' declared here > u8 data[1]; > > Using a flexible array member at the end of the struct avoids the > warning, but since we cannot have a flexible array member inside > of the union, each index now has to be moved back by one, which > makes it a little uglier. > > Signed-off-by: Arnd Bergmann Applied, thank you.