From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [RFC] Clang errors with bit fields and setting value of ~0. Date: Mon, 01 Dec 2014 11:38:09 +0100 Message-ID: <547C4511.7010002@6wind.com> References: <1417278816-24011-1-git-send-email-keith.wiles@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Keith Wiles Return-path: In-Reply-To: <1417278816-24011-1-git-send-email-keith.wiles-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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