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 0D2AC42AD3 for ; Thu, 11 May 2023 09:02:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0980242D69; Thu, 11 May 2023 09:02:18 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1E2BB42D69 for ; Thu, 11 May 2023 09:02:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683788536; 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=Gj0/6tIafwAylYizk/Er2XNURqCQCCuob3iHAvy8pK0=; b=C6t8k6AiM3dJB+NS1KXA/pIV51KhyqI9ASbW7Im9kiE+oF3Uom5SJDzRNYnQVrxA+v8PZl x+NmdVzKZHBWOrRs1df7veVrK93ZrMG+7HZpahLu/Kp6uvaYQX5o/uLqAq1F0gdNJojLYQ rFgS98O3Fmu3zU2Y6kIT7BePrvnKafE= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-26-qxwLvYfnNL2kAX3yClzygA-1; Thu, 11 May 2023 03:02:15 -0400 X-MC-Unique: qxwLvYfnNL2kAX3yClzygA-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-24e33239357so4717776a91.1 for ; Thu, 11 May 2023 00:02:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683788534; x=1686380534; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gj0/6tIafwAylYizk/Er2XNURqCQCCuob3iHAvy8pK0=; b=V/7X7FXnkai95L6WCESr24IWIWqNV2hfAlNpKkQtdz9snV52LpaZUPgR1zVEVu9jb4 ameNU5WH2idhu3DY+CeZlJwkvLt7Q+A/jk9hBqzd3KGkyQwTUD3uxsMWFMRBCwnv6HKA X0LPuIw4cPMizRQe3gTD2/WZHpd8k/akoKxqkdfjgCeJbvH6Uka8d3KW8IUwWX0QQjoB 0ZLCMWhLAxkBuKb8n1oVj2sHTl9o7TojC1/q+Fnk4zBUolwP747bzNc5S7Kpre1MYlbN YY1vvj5YEBf0Ex+YhVoj+Xg7+QyGU3zOSC2r33ZOVtxtULg48HnPBhPBAVPAIxReSO8h T4/Q== X-Gm-Message-State: AC+VfDyV09bneZaj8MWckio/LNQ0WMhvfCFmscLjHpdnKyN4laVgA0JI xSC6UGd+LDF69HpH4TyLU7iWJxEUOi3j7Me362WjRqddEAd7rhcIm31w+9WrLKE9dDlIT3zIW0g Batlfv7ZHvhaAIzTnSSJNNqs= X-Received: by 2002:a17:90a:70cf:b0:24e:59d2:6f with SMTP id a15-20020a17090a70cf00b0024e59d2006fmr19814892pjm.11.1683788534445; Thu, 11 May 2023 00:02:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SRlLS73tpC6od0QX9dNZN7JDb1ghoY4g+2scpX2+0irJbHRHQrDJ7hlLgpzcCyxFYGtQUl5IQ+FwMZyeQluA= X-Received: by 2002:a17:90a:70cf:b0:24e:59d2:6f with SMTP id a15-20020a17090a70cf00b0024e59d2006fmr19814881pjm.11.1683788534222; Thu, 11 May 2023 00:02:14 -0700 (PDT) MIME-Version: 1.0 References: <20230502135045.3541570-2-jerinj@marvell.com> <20230504085337.3446264-1-jerinj@marvell.com> In-Reply-To: <20230504085337.3446264-1-jerinj@marvell.com> From: David Marchand Date: Thu, 11 May 2023 09:02:03 +0200 Message-ID: Subject: Re: [dpdk-dev] [PATCH v2] examples/ntb: fix build issue with GCC 13 To: jerinj@marvell.com Cc: dev@dpdk.org, Jingjing Wu , Junfeng Guo , Xiaoyun Li , thomas@monjalon.net, ferruh.yigit@amd.com, stable@dpdk.org, Ali Alnubani X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, May 4, 2023 at 10:54=E2=80=AFAM wrote: > > From: Jerin Jacob > > Fix the following build issue by not allowing nb_ids to be zero. > nb_ids can be zero based on rte_rawdev_xstats_get() API > documentation but it is not valid for the case when second > argument is NULL. > > examples/ntb/ntb_fwd.c: In function 'ntb_stats_display': > examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get' > accessing 8 bytes in a region of size 0 [-Werror=3Dstringop-overflow=3D] > 945 | if (nb_ids !=3D rte_rawdev_xstats_get(dev_id, ids, values, nb_ids= )) { > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > examples/ntb/ntb_fwd.c:945:23: note: referencing argument 3 > of type 'uint64_t[0]' {aka 'long unsigned int[]'} > In file included from ../examples/ntb/ntb_fwd.c:17: > lib/rawdev/rte_rawdev.h:504:1: note: in a call to function > 'rte_rawdev_xstats_get' > 504 | rte_rawdev_xstats_get(uint16_t dev_id, > > Fixes: 5194299d6ef5 ("examples/ntb: support more functions") > Cc: stable@dpdk.org > Signed-off-by: Jerin Jacob > Tested-by: Ali Alnubani Acked-by: Junfeng Guo Tested-by: Daxue Gao Applied, thanks. --=20 David Marchand