Skip to content

Commit

Permalink
datapath: avoid cast-qual warning in vport_priv
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
  • Loading branch information
ddiproietto authored and jessegross committed Feb 3, 2014
1 parent 38b5f1e commit 61df342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datapath/vport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 61df342

Please sign in to comment.