From: Daniele Di Proietto Date: Thu, 23 Jan 2014 22:26:05 +0000 (+0100) Subject: datapath: avoid cast-qual warning in vport_priv X-Git-Tag: sliver-openvswitch-2.1.90-1~8^2~17 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=61df3421651dc0b9c12c1f22418a1769ba52c740;p=sliver-openvswitch.git datapath: avoid cast-qual warning in vport_priv This function must cast a const value to a non const value. By adding an uintptr_t cast the warning is suppressed. To avoid the cast (proper solution) several function signatures must be changed. Signed-off-by: Daniele Di Proietto Signed-off-by: Jesse Gross --- diff --git a/datapath/vport.h b/datapath/vport.h index de79d8c12..18b723ee8 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -173,7 +173,7 @@ void ovs_vport_deferred_free(struct vport *vport); */ static inline void *vport_priv(const struct vport *vport) { - return (u8 *)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN); + return (u8 *)(uintptr_t)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN); } /**