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 56E4F42AD3; Thu, 11 May 2023 09:02:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4720942D69; Thu, 11 May 2023 09:02:23 +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 8E6A442D5F for ; Thu, 11 May 2023 09:02:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683788542; 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=E+aM/Kl8wTN+f8DFxwgN+j9hMVYls5kAzMnJzoKyHBPr0Xh51dtlsYzpQIHeWm4Gf06NS+ 6YVHvkVbaok1ftcaSF6wQ/NUk4zeGwj0U7BQz9vSFKsiT4Uqbx//7wkltPwQWDblevfoRU o6JxlcRiOrrNyGWnBqhg7gDdHLYDMYk= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-m7sPsh7QPpSv0LrPupkOMQ-1; Thu, 11 May 2023 03:02:15 -0400 X-MC-Unique: m7sPsh7QPpSv0LrPupkOMQ-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-24e015fcf81so4719992a91.3 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=PqB4Sicg1qntE/ldMbCdATb8K8GuFhMvYD/PIOZz3udlFusF/igOM6RmppqrL5hpaK fW78gbJxooUrEZl+U75k6/9u1o9nURiRNRNo3R/t8DRzBsKRBkcPeYh/yfWCTO6aW+q+ 7HSx+0sJbh5WcwiPep0rumMmHGCbWJS43DFNG56+47yPTAsntRrsCgdaNKgt+dBW71kI I9+IyH4pPyP7i3Y11wNiqLfLJrJa7IziLSncwZj6R6VZvnDp2s7T/H3CWQijW2BwYNA1 NW2+m4bVpiGyG4r65cPfQF+CAWv5pr8jVNGeRJVhQs00lNFDyArcbLj639YAO7aE12+r F2aw== X-Gm-Message-State: AC+VfDzjIyG6Z99C2zL3nrmXi0cSdGr7aW/nSrVPnZ6nXu9K5sYpBho3 D3R6qoK4C6CQNY700MG53DuDXni1byuKkrJy41e3+Mlh+5ZWTaHl+xQHzWU/pk9L5/VNjU4PBkj p6lUCm1ZxOh4h4RoKkaJC/75BDJk= X-Received: by 2002:a17:90a:70cf:b0:24e:59d2:6f with SMTP id a15-20020a17090a70cf00b0024e59d2006fmr19814898pjm.11.1683788534447; 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: 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 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