From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 612B42BF7 for ; Wed, 23 May 2018 14:10:31 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id k5-v6so13965445wrn.3 for ; Wed, 23 May 2018 05:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p9FZP0Yn+LEhdfbrYfotg6MDs6LfaOO9+GTGfdrvIwA=; b=JJfBMRG4pS6CR4RIZbGmjqbM+jQSTQrK4RD0EZYKcnWe2zgxwd16ByRkYLH1uSTpz2 4Ey5yXoeSgVPaSip21Zfp/sa3IS6sZqSM1rubjJS/65IklNspGBJC3Tket/yWWB5S9ay CcKAuU0w0ZEIoWJdYC2SD389WPSaUSYkoYZVtPfG0CBg991GKifnjioFVFwCkAsH/EUX O0AluPEc53UKax5NCHzDxfU7YEWTsavNBWVVU2TaWzj5c/S2VQwy6TDqz90uVDj1fMGe k0muCxRON7rCmSvvkLr14R1rBlaGn/RhH8gumpYnm1obZeOqedkM6wZ/yLoKhKxHbGnG gJeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=p9FZP0Yn+LEhdfbrYfotg6MDs6LfaOO9+GTGfdrvIwA=; b=ENk3nq7x3PkvfNPOaCIHgvFI1IevpOKkRJ8FxAmClxFhfWVwpBu6V/3ffHLyuG4xiM oRXGsII7urfeL6X6Jeng8pMmj8OWy0i+gBQGkCEE+0zzFdmrYXx4uu0pYhgNl23AI+1C JOVODEFjNzl0yX07/mJntJXaeT9OLMOxmyxov7IE79js1DjNb7F4rHNFV05GwYyb3B1t 5VBQpNLo8USwc0bGN3jcZegK2CQddVAdtMVsXDJLeLdVBGaPmIjT42ejf+roNgAJmRXM GVbd9xmSEtxBEFtVo3MLF23/kq6lOoz08alvaodVeiOh9IUT0Ef+/i6Es+aFkmG8mEdp Vzog== X-Gm-Message-State: ALKqPwds1Kg66UD/2wA+n7Bf8BoX2nbs9TsGzPC0MC2HRRlCGZ127TWT dWZ70JRlhF1j803v9EzmfFgMgvZ/Hq8= X-Google-Smtp-Source: AB8JxZolP2SVPdVSSfbUaSzDvcTMB+XyoEVfXPJXRBOJ37kK5FFqTuId6INn2OgxTW71x4a6ymkHzw== X-Received: by 2002:adf:a219:: with SMTP id p25-v6mr2208804wra.19.1527077431023; Wed, 23 May 2018 05:10:31 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id c21-v6sm22192351wre.81.2018.05.23.05.10.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:30 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Bruce Richardson , dpdk stable Date: Wed, 23 May 2018 13:09:20 +0100 Message-Id: <20180523121010.8385-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180523121010.8385-1-luca.boccassi@gmail.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'eal: fix casts in random functions' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Wed, 23 May 2018 12:10:31 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/25/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 4f4dbdadb7a4206ec07accfb5f39742629ef22aa Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:49:12 +0800 Subject: [PATCH] eal: fix casts in random functions [ upstream commit d3db77d7d88e1f9227c2847f3355fc3e4bd256e8 ] GCC 8.1 warns: In function 'rte_srand': rte_random.h:34:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion] srand48((long unsigned int)seedval); rte_random.h:51:8: warning: conversion to 'uint64_t' {aka 'long unsigned int'} from 'long int' may change the sign of the result [-Wsign-conversion] val = lrand48(); ^~~~~~~ rte_random.h:53:6: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] val += lrand48(); Fixes: af75078fece3 ("first public release") Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_eal/common/include/rte_random.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/rte_random.h b/lib/librte_eal/common/include/rte_random.h index 63bb28088..b2ca1c209 100644 --- a/lib/librte_eal/common/include/rte_random.h +++ b/lib/librte_eal/common/include/rte_random.h @@ -31,7 +31,7 @@ extern "C" { static inline void rte_srand(uint64_t seedval) { - srand48((long unsigned int)seedval); + srand48((long)seedval); } /** @@ -48,9 +48,9 @@ static inline uint64_t rte_rand(void) { uint64_t val; - val = lrand48(); + val = (uint64_t)lrand48(); val <<= 32; - val += lrand48(); + val += (uint64_t)lrand48(); return val; } -- 2.14.2