Fix clang-tidy bugprone-macro-parentheses

Correct the definition of capnp_use(x) macro.

> recommended to surround macro arguments
> in the replacement list with parentheses. This
> ensures that the argument value is calculated
> properly.
This commit is contained in:
Jonah Beckford 2023-08-03 18:19:55 -07:00
parent c662042a60
commit 311b9cb0e0
5 changed files with 5 additions and 5 deletions

View file

@ -1597,7 +1597,7 @@ int main() {
fprintf(srcf, "/* AUTO GENERATED - DO NOT EDIT */\n");
fprintf(srcf, "#ifdef __GNUC__\n"
"# define capnp_unused __attribute__((unused))\n"
"# define capnp_use(x) (void) x;\n"
"# define capnp_use(x) (void) (x);\n"
"#else\n"
"# define capnp_unused\n"
"# define capnp_use(x)\n"