util: Fix GCC false-positive warning for CONTAINER_OF.
authorBen Pfaff <blp@nicira.com>
Fri, 7 May 2010 00:04:11 +0000 (17:04 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 7 May 2010 21:36:01 +0000 (14:36 -0700)
commit26adc8ddd75df99c17bf4bbe8dac5562213866bc
tree2be61c1fcac416f480d32d5c9538352a0035a55f
parentf4267e344a9373a4efefff8f8f5b85f532d223e1
util: Fix GCC false-positive warning for CONTAINER_OF.

On sparc, GCC would issue the following warning for every use of
CONTAINER_OF:

    warning: cast increases required alignment of target type

This is a false positive: assuming that the data structure that it is
applied to was allocated properly, the use of CONTAINER_OF to reach it is
valid.  And if it was not allocated properly, then code that accesses it
other ways will have trouble too.
lib/util.h