From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id EC7915A73 for ; Mon, 16 Mar 2015 18:52:22 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YXZBa-00008J-7e; Mon, 16 Mar 2015 13:52:21 -0400 Date: Mon, 16 Mar 2015 13:52:17 -0400 From: Neil Horman To: John McNamara Message-ID: <20150316175217.GE16238@hmsreliant.think-freely.org> References: <1426510564-19164-1-git-send-email-john.mcnamara@intel.com> <1426525506-19003-1-git-send-email-john.mcnamara@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426525506-19003-1-git-send-email-john.mcnamara@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] eal: fix Wbad-function-cast warning 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, 16 Mar 2015 17:52:23 -0000 On Mon, Mar 16, 2015 at 05:05:06PM +0000, John McNamara wrote: > Fix a warning when the rte_common.h header is included in a compilation > using -Wbad-function-cast, such as in Open vSwitch where the > following warning is emitted repeatedly: > > ../rte_common.h: In function 'rte_is_aligned': > ../rte_common.h:184:9: warning: cast from function call of > type 'uintptr_t' to non-matching type 'void *' [-Wbad-function-cast] > > This change fixes the issue in rte_common.h by using the RTE_ALIGN_FLOOR > macro to get the aligned floor value with generic type casting. > > Also removed the rte_align_floor_int() function and replaced it with > the RTE_PTR_ALIGN_FLOOR() macro. > > Signed-off-by: John McNamara Acked-by: Neil Horman