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 40EBDA0C4B; Fri, 15 Oct 2021 13:17:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FE0A411CB; Fri, 15 Oct 2021 13:17:00 +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 3937A410F1 for ; Fri, 15 Oct 2021 13:16:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634296617; 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=ZFcVP/rS29rvjO/zEQwKTqpPZpUTUDLxFk53v7El6iU=; b=c2L07uqTamcpOYRLiLrKYBjwWA5PxW+BjroUXKkH5MvjndGUnLCr2GdMcwrJQ9kaucCggX dKjAXMH71UdlM2DrDFuIjpBHKyqTmRV9G6f32MSNlG8MxvFqzwstH6v5JPBCPEo7LjpZXe r18F4BzJy1B8b7O/vC9Gs3VwbjklAPw= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-61-ZkzQ0NF-OpWGvhwU96c70A-1; Fri, 15 Oct 2021 07:16:51 -0400 X-MC-Unique: ZkzQ0NF-OpWGvhwU96c70A-1 Received: by mail-lf1-f71.google.com with SMTP id k8-20020a0565123d8800b003fd6e160c77so6434015lfv.17 for ; Fri, 15 Oct 2021 04:16:51 -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=ZFcVP/rS29rvjO/zEQwKTqpPZpUTUDLxFk53v7El6iU=; b=acQV8SXP3GOmwMYYvjb5qotQdca7Tj/NUp0jg1HfQZZyE92a6gknFVMSbBza4uoHkl Av5PbOKNJp2y4Pnn9ylLMrphy5w4UThCXCXjrs0YQ0sfKKBL/xJpY0AsgJXnFE1LQIL5 CY/6mbbznV4p6YJTgscKDqFsUFJyEAujOoODBnH4DYD3+GuMfV/RBG4a5pMpMYOAAR/7 CzQ7ASnP4Dx8nf+f6z3pwwsFeCwrXDLxkzzT2dhDI5C5xYfVGtuyJpagTfKuuY/aG3nM 5RjHHOBkf44HAer146yNAkywz1dUUC/ZFqcKqmUdpxT0fWUoiNrJlW9PVExbh1jNcbAx K9cw== X-Gm-Message-State: AOAM530Qz9FKkN8zdkZWfm15a4Ks46m3izpMS0GPqFQoqAuNTLEhCUCW KDRn75YYy+mpB/iRaOlSWFP/fBPg8MrqEQL/X6h0/7jKsZzJ5T6dV826JoXrvHINgi0tLkO88sY t/jOpyl7XaZzb/qVWGdk= X-Received: by 2002:a2e:b528:: with SMTP id z8mr12193980ljm.55.1634296610137; Fri, 15 Oct 2021 04:16:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLRVYdQPvwoEQy81q/XfkvVmZvdKts8pxSWSpzaxHC/NWLVZLvfJzR+r0AyAQXK2SMcZi0yemuvaEFMNgChjM= X-Received: by 2002:a2e:b528:: with SMTP id z8mr12193960ljm.55.1634296609939; Fri, 15 Oct 2021 04:16:49 -0700 (PDT) MIME-Version: 1.0 References: <20211015102819.4101559-1-ferruh.yigit@intel.com> In-Reply-To: <20211015102819.4101559-1-ferruh.yigit@intel.com> From: David Marchand Date: Fri, 15 Oct 2021 13:16:38 +0200 Message-ID: To: Ferruh Yigit Cc: John Daley , Hyong Youb Kim , Andrew Rybchenko , dev 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] [PATCH] net/enic: fix build with GCC 7.5 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 Sender: "dev" On Fri, Oct 15, 2021 at 12:28 PM Ferruh Yigit wrote: > > Build error: > ../drivers/net/enic/enic_fm_flow.c: In function 'enic_fm_flow_parse': > ../drivers/net/enic/enic_fm_flow.c:1467:24: > error: 'dev' may be used uninitialized in this function > [-Werror=maybe-uninitialized] > struct rte_eth_dev *dev; > ^~~ > ../drivers/net/enic/enic_fm_flow.c:1580:24: > error: 'dev' may be used uninitialized in this function > [-Werror=maybe-uninitialized] > struct rte_eth_dev *dev; > ^~~ > ../drivers/net/enic/enic_fm_flow.c:1599:24: > error: 'dev' may be used uninitialized in this function > [-Werror=maybe-uninitialized] > struct rte_eth_dev *dev; > ^~~ > > Build error looks like false positive, but to silence the compiler > initializing the pointer with NULL. enic_fm_check_transfer_dst() contains branches where dev is not set and those branches return rte_flow_error_set return value. dev is dereferenced later based on this return value == 0. So the compiler probably thinks that rte_flow_error_set may return 0. rte_flow_error_set is outside of compiler "view" at the moment it compiles enic_fm_flow.c, so the compiler making the assumption this function can return 0 is being prudent from my pov. > > Fixes: 7968917ccf64 ("net/enic: support meta flow actions to overrule destinations") > > Reported-by: David Marchand > Signed-off-by: Ferruh Yigit Your fix looks good in any case. Reviewed-by: David Marchand -- David Marchand