diff options
author | Alex Wang <alexw@nicira.com> | 2013-07-22 09:19:57 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-07-22 12:47:59 -0700 |
commit | 33e191a01b2c5aad1e97c109e66dec4b4d280ef6 (patch) | |
tree | 2bd6472602bc7f2de9a90c2108435d0252ab7a09 /lib/heap.h | |
parent | 55d2690646769467b6d26ad55516ff6eeb12869d (diff) |
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>
Diffstat (limited to 'lib/heap.h')
-rw-r--r-- | lib/heap.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Nicira, Inc. + * Copyright (c) 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,13 +69,13 @@ void heap_rebuild(struct heap *); #define HEAP_FOR_EACH(NODE, MEMBER, HEAP) \ for (((HEAP)->n > 0 \ ? ASSIGN_CONTAINER(NODE, (HEAP)->array[1], MEMBER) \ - : ((NODE) = NULL, 1)); \ + : ((NODE) = NULL, (void) 0)); \ (NODE) != NULL; \ ((NODE)->MEMBER.idx < (HEAP)->n \ ? ASSIGN_CONTAINER(NODE, \ (HEAP)->array[(NODE)->MEMBER.idx + 1], \ MEMBER) \ - : ((NODE) = NULL, 1))) + : ((NODE) = NULL, (void) 0))) /* Returns the index of the node that is the parent of the node with the given * 'idx' within a heap. */ |