[types] remove unused CONTAINING_RECORD macro (#2482)

This commit is contained in:
Abtin Keshavarzian
2018-01-16 17:16:52 +00:00
committed by Jonathan Hui
parent 7256270af0
commit 1dc8938d67
-12
View File
@@ -54,18 +54,6 @@ extern "C" {
#else
#include <windows.h>
#endif
#else
#ifndef CONTAINING_RECORD
/*#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#define CONTAINING_RECORD(address, type, field) \
((type *)((uint8_t*)(address) - offsetof(type, field)))
#pragma GCC diagnostic pop*/
#define BASE 0x1
#define myoffsetof(s,m) (((size_t)&(((s*)BASE)->m))-BASE)
#define CONTAINING_RECORD(address, type, field) \
((type *)((uint8_t*)(address) - myoffsetof(type, field)))
#endif /* CONTAINING_RECORD */
#endif /* _WIN32 */
/**