From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 897D0A0093; Mon, 18 May 2020 13:49:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 054B01D42A; Mon, 18 May 2020 13:49:04 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id D96EA1D409 for ; Mon, 18 May 2020 13:49:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589802541; 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=9lqHDPPMv3KEZtRaookYtXPqP60g/OBFhVCwBr+vewY=; b=R5L8xC1o/8Geo91Ksg2aMMaLS4JHSVCjKF84ujw65aM890xBfvM6ePkbBkdvk6sowTyNfh F6+tLy65LzjzolbjuW+KOWhvAVpkxwXsCG5kCDmpCJZgXeVOxtZ/SvbF5xd3Y3cMa0RS8F RgxZ2Le68W6x5XF+3lZrbKcQQr1YOzo= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15-3bCOsl6zOKaJQLlt9KG5bQ-1; Mon, 18 May 2020 07:48:59 -0400 X-MC-Unique: 3bCOsl6zOKaJQLlt9KG5bQ-1 Received: by mail-vk1-f197.google.com with SMTP id j206so4443141vke.11 for ; Mon, 18 May 2020 04:48:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9lqHDPPMv3KEZtRaookYtXPqP60g/OBFhVCwBr+vewY=; b=nZjqOOrVtGYpQr6mcN5+dd3JiEz+UaItVKDxmNHbvnKFNI2HEeJIPtpfJcx8rX1lgp GXt3+Yk9LCTdaJtQG1Et0wj6msL52jtq3yHdusR8BfVS2Z8HOb8wkM6RAvKmHNwylXzo aXnG17g2ZwqivDYFvNlG2LYi4qjYX0mFGsouYleVCibf9sWKAQnLEW9HeBvmAD7CBAOI q9a+SxRyvP8NFrSj9kkEuoU6wQVQXZbySu9ZDkeL5/mcVipNnjfERfb1l03cIZ4qJ6dT q+TJ6NYLDVlVuFanFlyWbpU+8sQ1swCSfwsaDbsg0hEULSuBXW0CR/58vhQOe8f+3bi8 /cFw== X-Gm-Message-State: AOAM5311/p3E8FBwZlJg8rO/9bJWf6pCINhv+mCBWw60uWxgAKhRqDzc iVSYcdMNPm6bc6ygs5B1ytVS7q/+vX4uJKYQbfe65GDbHjRmvEkjwwF1QR5VtRLLIVX8nUEZKQn KaxDFYBcle+tZNrj1qXI= X-Received: by 2002:a1f:2e16:: with SMTP id u22mr10300855vku.12.1589802539301; Mon, 18 May 2020 04:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcgE38WED16MPYDxbplODC//3ZbAG2uRCHkUlhNoBS4AcyJTYCOi/fzXPDKTbwd6RvZ/OggsxTpLw6/DrBNIo= X-Received: by 2002:a1f:2e16:: with SMTP id u22mr10300839vku.12.1589802538973; Mon, 18 May 2020 04:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20200515142808.14064-1-ktraynor@redhat.com> In-Reply-To: <20200515142808.14064-1-ktraynor@redhat.com> From: David Marchand Date: Mon, 18 May 2020 13:48:47 +0200 Message-ID: To: Kevin Traynor Cc: dev , "Wang, Yipeng1" , "Gobriel, Sameh" , Bruce Richardson , Honnappa Nagarahalli , "Yigit, Ferruh" , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] hash: fix gcc 10 maybe-uninitialized warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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, May 15, 2020 at 4:28 PM Kevin Traynor wrote: > > gcc 10.1.1 reports a warning for the ext_bkt_id variable: > > ../lib/librte_hash/rte_cuckoo_hash.c: > In function =E2=80=98__rte_hash_add_key_with_hash=E2=80=99: > ../lib/librte_hash/rte_cuckoo_hash.c:1104:29: > warning: =E2=80=98ext_bkt_id=E2=80=99 may be used uninitialized in this f= unction > [-Wmaybe-uninitialized] > 1104 | (h->buckets_ext[ext_bkt_id - 1]).sig_current[0] =3D short_sig; > | ~~~~~~~~~~~^~~ > > The return value of rte_ring_sc_dequeue_elem() is already checked, > but also initialize ext_bkt_id to zero (invalid value) and check > that it also overwritten. > > Fixes: fbfe568103b0 ("hash: use 32-bit elements rings to save memory") > Cc: stable@dpdk.org > > Signed-off-by: Kevin Traynor Acked-by: Yipeng Wang Applied, thanks. --=20 David Marchand