[uwac] elminate pedantic warnings from defines

This commit is contained in:
akallabeth
2024-08-30 15:17:10 +02:00
parent 48aaa53a84
commit 7c1fd71b7b

View File

@@ -25,18 +25,9 @@
#include <stdlib.h> #include <stdlib.h>
#define min(a, b) \ #define min(a, b) (a) < (b) ? (a) : (b)
({ \
__typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \
_a < _b ? _a : _b; \
})
#define container_of(ptr, type, member) \ #define container_of(ptr, type, member) (type*)((char*)(ptr)-offsetof(type, member))
({ \
__typeof__(((type*)0)->member)* __mptr = (ptr); \
(type*)((char*)__mptr - offsetof(type, member)); \
})
#define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a)[0]) #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a)[0])