[ovs-dev] [PATCH 3/3] clang: Fix the alignment warning.
Ben Pfaff
blp at nicira.com
Mon Jul 22 20:24:10 UTC 2013
On Mon, Jul 22, 2013 at 09:19:58AM -0700, Alex Wang wrote:
> This commit fixes the warning issued by 'clang' when pointer is casted
> to one with greater alignment.
>
> Signed-off-by: Alex Wang <alexw at nicira.com>
Could you use the existing ofpbuf_at() instead of a new
ofpbuf_forward_ref()? If there's no appropriate 'size' in a given
call then you can use 0.
It shouldn't be necessary to cast the return value of
ofpbuf_forward_ref() or ofpbuf_at(), generally, because they return
void *.
It isn't necessary to parenthesize the arguments to ALIGNED_CAST,
since the macro properly parenthesizes them internally.
Thanks,
Ben.
More information about the dev
mailing list