From: Jakob Bornecrantz Date: Mon, 7 Apr 2008 17:39:28 +0000 (+0200) Subject: gallium: Stop warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24fc93ebdc119ee01d6ce47ea4fe33a2a8067bd2;p=mesa.git gallium: Stop warnings --- diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h index 8e3aaee496f..1bc00ac7a02 100644 --- a/src/gallium/include/pipe/p_util.h +++ b/src/gallium/include/pipe/p_util.h @@ -207,7 +207,10 @@ mem_dup(const void *src, uint size) #define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) +/* JB stop warnings */ +#ifndef Elements #define Elements(x) (sizeof(x)/sizeof((x)[0])) +#endif #define Offset(TYPE, MEMBER) ((unsigned)&(((TYPE *)NULL)->MEMBER)) /**