Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3629096pxb; Mon, 24 Jan 2022 13:55:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV+2osnamwipXbWAv6ZGkHa/C6a+juFuIqjGzop0tt5K/PWed32hVGCOMW5uQxCFeCAOCI X-Received: by 2002:a62:e210:0:b0:4c9:1cff:15cc with SMTP id a16-20020a62e210000000b004c91cff15ccmr3279439pfi.55.1643061318916; Mon, 24 Jan 2022 13:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061318; cv=none; d=google.com; s=arc-20160816; b=sCjhAmYB+rCErjPrrtIO7XtaDprI2jcgzV3gdgiL/tU/XaA+Byr8N2E7zCprGfW433 x7sA0Ew/ZiKBIjqfZXcJsnMfPHohZZq+xAKJ/ADsUtEMJQ9QKjlaO1yaFBu6CiBM0C/X lnI4bBjdm8daiXervItm4fJIk2ZNwpjh0jG/Zdm+PrPUYyXxuz5KlaGFwM9M3C5Do/ag Zg01h93O8wjgvC5UiWoHM7xDB1Fw4NRi6FcwhGP4yjExqgvDWWEjquQ1nKEpyKsGvASs zaC+DcaTheX79NTMDp5wxjM7Umt3UCh8CaAZQ6KlTzTF6mBHlCBEAyadADwFqplS4UnC sHMA== 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=oucPdkSUp/WKGhXeZTmGU7/7WthQguUtUC2qUaDDPG7mCes/NxXaAFIiXQoBoV5s3Q bXAk6Mfa03pZ2t43hSZndDVZQNNKlAqVBKjHs5j3q7EU827VasR4OZSkCb5ZcVBmsX53 k2QCUXvtXarGpd9Xf4JT566vJfvIxwf6ofo7ZuxenVk9BG6TKh/ljoZgqIYYdVcl1wBv ObsDAGxEWa5cF7+QxGjPuXxbJXUHqCSmj1r8+IdFK1G+c77QQTqsnvq0VQhUzz+cvua4 pOmUs8jH31SV9KRSXbozFm61mmW4tRz/k9dmMwd8j4x58RRy8cWACuk+i+6ld++K20j4 6yAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qdWULLho; 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 kx3si410876pjb.166.2022.01.24.13.55.06; Mon, 24 Jan 2022 13:55:18 -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=qdWULLho; 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 S1457634AbiAXVmA (ORCPT + 99 others); Mon, 24 Jan 2022 16:42:00 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53558 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1445759AbiAXVEz (ORCPT ); Mon, 24 Jan 2022 16:04:55 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6DA666131F; Mon, 24 Jan 2022 21:04:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51288C340E5; Mon, 24 Jan 2022 21:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058293; bh=MONWWN5Pw6rnKPiBEgg31qpoflv/TBpsiZxOuGbiM5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qdWULLho5spHXQocU6/tTGN3Cbp2Giwa4H5GNCDEvv0xdLr5t/YWHNcPQhVBYIxLH IU7txAEktGkSa2oBxEWou4Km4fEk8zJevHeJQAOyO1b2R/eE3qN3Kzo46IiCjD04UO nvXr1XhaMzSEQAJwV9h9kFczxWBgg98+v7+1n840= 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.16 0243/1039] samples: bpf: Fix unknown warning group build warning on Clang Date: Mon, 24 Jan 2022 19:33:52 +0100 Message-Id: <20220124184133.493287897@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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