[uwac] elminate pedantic warnings from defines

This commit is contained in:
akallabeth 2024-08-30 15:17:10 +02:00
parent 48aaa53a84
commit 7c1fd71b7b
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

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