From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D51B8A0503; Wed, 18 May 2022 12:18:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A234842B9B; Wed, 18 May 2022 12:18:04 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7656040A7D for ; Wed, 18 May 2022 12:18:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652869083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LM/x7PulAV6h9ltzVEzlSvTBhCc7hLQBO4EZnodeW2o=; b=asumr7171V8ja07u0w1BlrH4cOcbj1oKruQrZeDdvY++q0F+VXIkSjZNKSye2qXDtasl93 ojbkMo1BZT9cBj0ygQ7GsAO2WXwipvbwFLjieBwUw/7xMmQIUjB3Vxz7GxoTRuBThCEpRS eu46hFscjrZbdWQyyd15Q2AYxiIiyhg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-e9ocsnDiMsGEakWkMaMqFA-1; Wed, 18 May 2022 06:17:57 -0400 X-MC-Unique: e9ocsnDiMsGEakWkMaMqFA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6361B185A7B2; Wed, 18 May 2022 10:17:57 +0000 (UTC) Received: from fchome.home (unknown [10.40.195.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A7F2492C14; Wed, 18 May 2022 10:17:54 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Qiming Yang , Qi Zhang Subject: [PATCH 07/12] net/ice/base: fix build with GCC 12 Date: Wed, 18 May 2022 12:16:52 +0200 Message-Id: <20220518101657.1230416-8-david.marchand@redhat.com> In-Reply-To: <20220518101657.1230416-1-david.marchand@redhat.com> References: <20220518101657.1230416-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GCC 12 raises the following warning: ../drivers/net/ice/base/ice_switch.c: In function ‘ice_add_sw_recipe’: ../drivers/net/ice/base/ice_switch.c:7219:61: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 7219 | buf[recps].content.lkup_indx[i + 1] = entry->fv_idx[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from ../drivers/net/ice/base/ice_controlq.h:8, from ../drivers/net/ice/base/ice_type.h:54, from ../drivers/net/ice/base/ice_common.h:8, from ../drivers/net/ice/base/ice_switch.h:8, from ../drivers/net/ice/base/ice_switch.c:5: ../drivers/net/ice/base/ice_adminq_cmd.h:744:12: note: at offset 5 into destination object ‘lkup_indx’ of size 5 744 | u8 lkup_indx[5]; | ^~~~~~~~~ Since this code is in the base driver, waive the check until the base driver is fixed by the relevant people. Cc: stable@dpdk.org Signed-off-by: David Marchand --- drivers/net/ice/base/meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build index 3cf4ce05fa..89d8c5eba1 100644 --- a/drivers/net/ice/base/meson.build +++ b/drivers/net/ice/base/meson.build @@ -40,6 +40,11 @@ if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0')) error_cflags += ['-Wno-array-bounds'] endif +# FIXME +if (toolchain == 'gcc' and cc.version().version_compare('>=12.0.0')) + error_cflags += ['-Wno-stringop-overflow'] +endif + if is_windows and cc.get_id() != 'clang' cflags += ['-fno-asynchronous-unwind-tables'] endif -- 2.36.1