From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id BC0838040 for ; Mon, 1 Dec 2014 11:38:19 +0100 (CET) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XvOQ5-0006Wb-4x; Mon, 01 Dec 2014 11:41:32 +0100 Message-ID: <547C4511.7010002@6wind.com> Date: Mon, 01 Dec 2014 11:38:09 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Keith Wiles References: <1417278816-24011-1-git-send-email-keith.wiles@windriver.com> In-Reply-To: <1417278816-24011-1-git-send-email-keith.wiles@windriver.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC] Clang errors with bit fields and setting value of ~0. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2014 10:38:19 -0000 Hi Keith, On 11/29/2014 05:33 PM, Keith Wiles wrote: > error: implicit truncation from 'int' to bitfield > changes value from -1 to 127 [-Werror,-Wbitfield-constant-conversion] > tx_offload_mask.l2_len = ~0; > Converted to use correct bit values > tx_offload_mask.l2_len = 0x7f; > > Signer-off-by: Keith Wiles > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > I just submitted a patch that fixes the same issue without having to know the size of the bitfield. http://dpdk.org/ml/archives/dev/2014-December/009112.html Regards, Olivier