From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 420151D098 for ; Sun, 13 May 2018 18:24:05 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CEB0725CD2; Sun, 13 May 2018 12:24:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 May 2018 12:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=8RUyTYId1DlHzaYm81qP7NJ3k7 5tXhf9LQl6iheijJM=; b=MGeiga2rkgue8v4MC+2aXyC/Kg9oL+W7TeJoIFR4w5 vvoYO+U9jZYYb75+kmyH01/tBadevJCqWi9juf7acyfpXDkD601Q2ODMzJGuPqAb g1sXvw5r3NzMGUMnUoyPxGartgWupVyluWR8uEjvKfBy7iQCs71nwTQd0vSq4BEK 4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=8RUyTY Id1DlHzaYm81qP7NJ3k75tXhf9LQl6iheijJM=; b=HP4uJvy0Npv2VADgyKUSng bLQLg3L8UKx2o5KmfDLbq+mtsTML9jOg5BWN4Vc0qZLYzVXQ9qk7OmPoYbrQUgyw KXTx7KV/bO9Y5C6A4C4QKxNcDrff/qNnvpehU4j6Bt2cSUn3MxcjKFZB8z0/jzYu PI2fPB6C8uVUdpZx/PcocfI3dp/y/3jZ5AifxZ1U776TPMMeC5/3yCQtt5RBc3Zt ZgSE01hrcxEb5kV2G0cf5oN/E49NrsZCJer07UhVHYR9VAZtHNQ9jyxyNKb1zALT 6noL4z3aITNcKhWrB1HTI2tSHutVkkVETnT0mEZig2tLq4k+cxD59DP091chTgAw == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 46EBFE4855; Sun, 13 May 2018 12:24:04 -0400 (EDT) From: Thomas Monjalon To: Andy Green Cc: dev@dpdk.org Date: Sun, 13 May 2018 18:24:03 +0200 Message-ID: <3918757.SVKzEjPn4h@xps> In-Reply-To: <152609035240.121661.17896359108855967217.stgit@localhost.localdomain> References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609035240.121661.17896359108855967217.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 06/24] /lib/librte_eal: stage cast from uint64 to long 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: , X-List-Received-Date: Sun, 13 May 2018 16:24:05 -0000 12/05/2018 03:59, Andy Green: > warning: conversion to 'uint64_t' {aka 'long unsigned int'} > from 'long int' may change the sign of the result > [-Wsign-conversion] > val = lrand48(); > ^~~~~~~ [...] > rte_rand(void) > { > uint64_t val; > - val = lrand48(); > + val = (unsigned long)lrand48(); I think the right cast is uint64_t. It makes a difference in 32-bit environment.