mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 07:45:30 +00:00
clang: Fix the "expression result unused" warning.
This commit makes macro function "ASSIGN_CONTAINER()" evaluates to "(void)0". This is to avoid the 'clang' warning: "expression result unused", since most of time, the final evaluated value is not used. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -189,9 +189,9 @@ is_pow2(uintmax_t x)
|
||||
* 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)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
Reference in New Issue
Block a user