Add parentheses around use of zerouuid macro (#371)
Otherwise the preprocessor may gobble up the commas in mistake of extra parameters when it is passed to uuidcmpzero. cppcheck v1.86 was complaining about this line.
This commit is contained in:
parent
65bf34b3b7
commit
ecc3cb5377
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ extern "C"
|
|||
#define UUID_SIZE 16
|
||||
#define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE))
|
||||
#define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define uuidcmpzero(uuid) uuidcmp(uuid, zerouuid)
|
||||
#define uuidcmpzero(uuid) uuidcmp(uuid, (zerouuid))
|
||||
|
||||
// Forward declare
|
||||
typedef struct rcl_action_server_t rcl_action_server_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue