Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3977325pxb; Tue, 25 Jan 2022 00:28:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbrqJbIG/OR+f131eI0s5H8k7RiCxhI4l4ThOmCG0eww5oFGJjA0pIVWaWg1qYahf7ySO5 X-Received: by 2002:a05:6a00:24d6:b0:4ca:c762:71b9 with SMTP id d22-20020a056a0024d600b004cac76271b9mr1928899pfv.40.1643099304223; Tue, 25 Jan 2022 00:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099304; cv=none; d=google.com; s=arc-20160816; b=VKluLeO8PbotoJ5B9zKIRMzb3g/u4EaiHsDhxUecm7nWXKUrJHcNvrNao48izZEx9+ /SvnG2BjidOScO6DxV7Dfy+enm3Au6EUhcXYuAiW8Nl3xxpHyTyjXQLRI4ybcX4/5g/R u8x+efEZShxeWSwzdwzxQzW/lVNtjY+xmhIT2cSeH+qlTsNnsshKzc8Uni29pCqGN0En r8H/TpntibItNwFGsGGK1pQKY1liew7k/R0TVPXJNUdZylbBbCoHowyovVQiT+/lDNGs xLm/Pb/NsUiln6RzBkr+0uLamqNj7smHhN7fyWOH9mSZLWb3tgkbFHS0IzrHsR0bUE0g qe4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RoXqCf7bMaXAGuXBh0Q4eugAfqOyTn14qbEVblhTR+w=; b=umxo5/oQNOBZzNfGei6NXXxvl4+6Q9dWN6a+uH+M9c+U//2aDOS5NckJH/XnGA3VGP zs5+28psW1t7EUEvH7+u8Jzy55n4b566Y6q9y+VKBp/Qo7ZWQGk1Jpkk5ToIOcRJTh2W zfIV4qdlrKzXs5bg8UiiAqDj9ny2GkWrJOYKmoDkT5j2HYd/K274xZaftSAmltPyF647 1fPGTd2ERsxR+uM04JrIl/CstFFBV7rlN/xf9xxZ7BP2/+1Hn9cxxP1iqXMrW6A3cES7 BYeehHlDv02F5H/uZV9lUHfvk1D5kabpjwqqICEhDAy2FgyYCJpoBQiBM4nRkQJNQCWf /9Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Kg3R5esM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si14187035plg.406.2022.01.25.00.28.11; Tue, 25 Jan 2022 00:28:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Kg3R5esM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3422642AbiAYCbo (ORCPT + 99 others); Mon, 24 Jan 2022 21:31:44 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:58810 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381432AbiAXUUT (ORCPT ); Mon, 24 Jan 2022 15:20:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7E062B8121C; Mon, 24 Jan 2022 20:20:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A8D9C340E5; Mon, 24 Jan 2022 20:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055617; bh=MONWWN5Pw6rnKPiBEgg31qpoflv/TBpsiZxOuGbiM5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kg3R5esM/WAn8Ee8IpdxAdNChw8OZJabuEFCNJ52mDX384F4n+oq6o4Mx4s5iiDVw IRC4GTGK4wHzKZAwUnArwxSsynmtjBGXJgEQU8rhq/THID55os9Ccub558jH/2yvUl SIDQh4SdQYIBHD6/MXdgdWNp2QYiK20ANHKM43+U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Lobakin , Andrii Nakryiko , Kumar Kartikeya Dwivedi , Sasha Levin Subject: [PATCH 5.15 209/846] samples: bpf: Fix unknown warning group build warning on Clang Date: Mon, 24 Jan 2022 19:35:26 +0100 Message-Id: <20220124184108.131751511@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Lobakin [ Upstream commit 6f670d06e47c774bc065aaa84a527a4838f34bd8 ] Clang doesn't have 'stringop-truncation' group like GCC does, and complains about it when building samples which use xdp_sample_user infra: samples/bpf/xdp_sample_user.h:48:32: warning: unknown warning group '-Wstringop-truncation', ignored [-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wstringop-truncation" ^ [ repeat ] Those are harmless, but avoidable when guarding it with ifdef. I could guard push/pop as well, but this would require one more ifdef cruft around a single line which I don't think is reasonable. Fixes: 156f886cf697 ("samples: bpf: Add basic infrastructure for XDP samples") Signed-off-by: Alexander Lobakin Signed-off-by: Andrii Nakryiko Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20211203195004.5803-3-alexandr.lobakin@intel.com Signed-off-by: Sasha Levin --- samples/bpf/xdp_sample_user.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/bpf/xdp_sample_user.h b/samples/bpf/xdp_sample_user.h index d97465ff8c62c..5f44b877ecf5f 100644 --- a/samples/bpf/xdp_sample_user.h +++ b/samples/bpf/xdp_sample_user.h @@ -45,7 +45,9 @@ const char *get_driver_name(int ifindex); int get_mac_addr(int ifindex, void *mac_addr); #pragma GCC diagnostic push +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif __attribute__((unused)) static inline char *safe_strncpy(char *dst, const char *src, size_t size) { -- 2.34.1