X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Futil.h;h=0e9353dbd5c42056eae02da2d283480cdabdab8a;hb=69123704450703f7ebea4af9e3b9635399fc21f2;hp=9df6db5836833522dfeb955fa98e19354f232fda;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=openvswitch diff --git a/lib/util.h b/lib/util.h index 9df6db58..0e9353db 100644 --- a/lib/util.h +++ b/lib/util.h @@ -80,7 +80,7 @@ extern const char *program_name; /* Given POINTER, the address of the given MEMBER in a STRUCT object, returns the STRUCT object. */ #define CONTAINER_OF(POINTER, STRUCT, MEMBER) \ - ((STRUCT *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER))) + ((STRUCT *) (void *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER))) #ifdef __cplusplus extern "C" {