From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 848B0A0C41;
	Thu, 30 Sep 2021 10:29:51 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 1713B41122;
	Thu, 30 Sep 2021 10:29:51 +0200 (CEST)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [216.205.24.124])
 by mails.dpdk.org (Postfix) with ESMTP id 4D66241104
 for <dev@dpdk.org>; Thu, 30 Sep 2021 10:29:49 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1632990588;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=mvM118JQJt+nxAkZluwO9ZT+Yee34RK9MOiOpuntP28=;
 b=W3zAYsiVGVOycWhDDKwRyT0Zhhq82RKqdxwZC7LyM3b5DfBI2N0mfjHdtKn+8V/5snSTZL
 /jAAeEzQI86plIDfZma9Z+gPj50FrhRKR8/3YYhed6aJ+fhVCcnaVjyoxzxEjXpKXMCRKa
 enkcdChNEDKmRm2OVPnx5fEIpZgabSQ=
Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com
 [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-181-frtJv3aTP3iYMqigwR9JHQ-1; Thu, 30 Sep 2021 04:29:47 -0400
X-MC-Unique: frtJv3aTP3iYMqigwR9JHQ-1
Received: by mail-lf1-f70.google.com with SMTP id
 s8-20020ac25c48000000b003faf62e104eso4854607lfp.22
 for <dev@dpdk.org>; Thu, 30 Sep 2021 01:29:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=mvM118JQJt+nxAkZluwO9ZT+Yee34RK9MOiOpuntP28=;
 b=EV/ldTBOjgg9uvAuLob7bTevjhBvnwfS+dCkzNCCasFXC3MBvMI92mgGn8kiyraMU3
 IQ57Co17iXuAhtJBLcCWmQ4GnV7ahEyCOzXwkMzhXNetcrHWxerMwU+7SbKhG6cAd/73
 ax4ugHT9itsEF1RU2J11I+9e5/Mg+1BSemHChS0Rd07aOu27iXpM5HQ3aYo+XdsW7ADa
 LgOwUGbcZG652zmUXdIJGJDT3zUp9vlgzy36TsnC6GjM9lir1Ni7orV9mtGeKyTnnRt+
 6tL6GVcJZ7MotqoTWupLtOrR0to1Wp8PLKV1BdajGSRobukadKQkqJSkdY2wpuweHqVl
 VtSQ==
X-Gm-Message-State: AOAM531/2NDJS2qySzzRrRPk3YwILPfEyLD0uj5GTmAy4RBPxu8TX0J9
 sjuielwt2woio6D3GQHnbsXFFbO/Wk1iVwSyO+bcu6Pao3p4u/ILXsli8W+syfbfbrlkK86WaEl
 9bBGwbEWfUgYelH43x3g=
X-Received: by 2002:a05:6512:31c3:: with SMTP id
 j3mr4470470lfe.217.1632990585996; 
 Thu, 30 Sep 2021 01:29:45 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJz2dVAqX2RfpEjHCrnFRC1QFjy9792FerE7bZFcZG2HIT86eg56OKODKDNLRq+mTtbB/Ie7Q27ua/822fFoiIY=
X-Received: by 2002:a05:6512:31c3:: with SMTP id
 j3mr4470453lfe.217.1632990585823; 
 Thu, 30 Sep 2021 01:29:45 -0700 (PDT)
MIME-Version: 1.0
References: <20210924100310.4278-1-zhihongx.peng@intel.com>
 <20210930052724.195414-1-zhihongx.peng@intel.com>
 <20210930052724.195414-2-zhihongx.peng@intel.com>
In-Reply-To: <20210930052724.195414-2-zhihongx.peng@intel.com>
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 30 Sep 2021 10:29:34 +0200
Message-ID: <CAJFAV8w8Zj5xP+giZtYCUz=4ekuFRDW5Niys9uM6xvAW0kteQg@mail.gmail.com>
To: Zhihong Peng <zhihongx.peng@intel.com>
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>, 
 "Ananyev, Konstantin" <konstantin.ananyev@intel.com>, 
 Stephen Hemminger <stephen@networkplumber.org>, dev <dev@dpdk.org>, 
 Xueqin Lin <xueqin.lin@intel.com>, dpdk stable <stable@dpdk.org>
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v6 2/2] lib/pipeline: Fix gcc
 compilation error using ASan
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Thu, Sep 30, 2021 at 7:37 AM <zhihongx.peng@intel.com> wrote:
>
> From: Zhihong Peng <zhihongx.peng@intel.com>

Commit titles don't start with lib/.


>
> After adding ASan, the gcc compilation check will be stricter.
> "Control reaches end of non-void function" error occurs here.

Fwiw, I could not pinpoint the right version where this warning appears.
I can't see it with gcc v4.8.5 (rhel7), but I get it with gcc 11.2.1 (fc34).
Do you know which versions are affected? Just asking for info.


>
> Fixes: f38913b7fb8e (pipeline: add meter array to SWX)

Should be formatted as:
Fixes: f38913b7fb8e ("pipeline: add meter array to SWX")

Please use a git alias as suggested in the contribution guide.


> Cc: stable@dpdk.org
>
> Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
> Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> ---
>  lib/pipeline/rte_swx_pipeline.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
> index 1cd09a4b44..0acd6c6752 100644
> --- a/lib/pipeline/rte_swx_pipeline.c
> +++ b/lib/pipeline/rte_swx_pipeline.c
> @@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
>                 return 0;
>         }
>
> -       CHECK(0, EINVAL);
> +       return -EINVAL;
>  }
>
>  static inline void
> @@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
>                                               instr,
>                                               data);
>
> -       CHECK(0, EINVAL);
> +       return -EINVAL;
>  }
>
>  static struct instruction_data *

There are two other functions (instr_table_translate, and
instr_extern_translate) which have the same pattern in this file.
Odd that the compiler is not reporting them.

-- 
David Marchand