* that that OBJECT points to, assigns the address of the outer object to
* OBJECT, which must be an lvalue.
*
- * Evaluates to 1. */
+ * Evaluates to (void) 0 as the result is not to be used. */
#define ASSIGN_CONTAINER(OBJECT, POINTER, MEMBER) \
- ((OBJECT) = OBJECT_CONTAINING(POINTER, OBJECT, MEMBER), 1)
+ ((OBJECT) = OBJECT_CONTAINING(POINTER, OBJECT, MEMBER), (void) 0)
+
+/* Given ATTR, and TYPE, cast the ATTR to TYPE by first casting ATTR to
+ * (void *). This is to suppress the alignment warning issued by clang. */
+#define ALIGNED_CAST(TYPE, ATTR) ((TYPE) (void *) (ATTR))
#ifdef __cplusplus
extern "C" {