From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] eal: fix Wbad-function-cast warning Date: Tue, 17 Mar 2015 00:29:23 +0100 Message-ID: <2590049.SJhoNc6m2k@xps13> References: <1426510564-19164-1-git-send-email-john.mcnamara@intel.com> <1426525506-19003-1-git-send-email-john.mcnamara@intel.com> <20150316175217.GE16238@hmsreliant.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: John McNamara Return-path: In-Reply-To: <20150316175217.GE16238-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@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" 2015-03-16 13:52, Neil Horman: > 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 Applied, thanks