提交 07dc0602 编写于 作者: D Daniele Di Proietto 提交者: Jesse Gross

openvswitch: 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: NDaniele Di Proietto <daniele.di.proietto@gmail.com>
Signed-off-by: NJesse Gross <jesse@nicira.com>
上级 d0b4da13
......@@ -172,7 +172,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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册