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 55BA6A0093 for ; Mon, 18 May 2020 13:49:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2837A1D40A; Mon, 18 May 2020 13:49:06 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 182491D446 for ; Mon, 18 May 2020 13:49:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589802543; 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=ADPUO6NAW9f1k1n9TuCKsLiW+xelFtSrwvOH9MiHuJf2tmSyvcLvU88gNcdqNCEg4JKDa5 r8rx6H6O+E1Ys5vV2RElAry1jt3bMooSc/jxSDSfo9Eye0O9x0kewW470+Ti90TL71nt/1 atcqLqltOYenm2mxImb4V6Oq9mjYi60= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-NKXY6eupOZGb0ZqpylapGA-1; Mon, 18 May 2020 07:48:59 -0400 X-MC-Unique: NKXY6eupOZGb0ZqpylapGA-1 Received: by mail-vs1-f69.google.com with SMTP id l191so998720vsd.22 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=LwaEMyKfPhbhsGkvpme4LnBBZsYm25rgdaD4TVw6dZ+sQ93yqaXvDM7q3qOV6uSTSU uRpAUjvLPIEHZKSbeqpo9WDhxjeBShYS8sqII9gjVTswdP6kcazkp+gKUV8bBqwIKVCZ a1MBza0hY3MGM4L2G5zCxlqxRnvwr7g3dTrsttgTy9jUN5o6jhXieQrCDnGceoAQ6Xwq aRBvVV5PoQkP0x4m7aSk42rtkfU4Y40l0h2mxv7eg6DGeZh8cfu7dDjm7iqeiQsZ2xV1 /GxTCfLw4O4w39kdaB41B9BommcaQZVKuhfadMuqsfRROnagKqhbUAio4CQuFM6tyJJJ IxkQ== X-Gm-Message-State: AOAM5326jEKagZaVm7kUTttj25HNbFtY8ePcodYM0J5+2IRynLSyQcIP LcS+mnd13A+rAB2+CMpumK2NZf6t6FGh1WD7XvyxOudNBtr7i/iQDgmk94rYXa8xxf2eZ7ItbJd hhWMBkRloibydYmpnhRJtBew= X-Received: by 2002:a1f:2e16:: with SMTP id u22mr10300852vku.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-stable] [PATCH] hash: fix gcc 10 maybe-uninitialized warning X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" 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