Silence empty struct warning
Last but not least, -Wpedantic warns about empty structs. With this, -Wpedantic build is now clean of warnings on gcc 5.4.0 and clang 4.0.
This commit is contained in:
parent
b0810da2c3
commit
aa1f31d401
2 changed files with 10 additions and 8 deletions
|
|
@ -960,7 +960,9 @@ static void define_struct(struct node *n) {
|
|||
|
||||
str_add(&HDR, s.enums.str, s.enums.len);
|
||||
|
||||
str_addf(&HDR, "\nstruct %s {\n", n->name.str);
|
||||
str_addf(&HDR, "\n%sstruct %s {\n",
|
||||
s.decl.len == 0 ? "capnp_nowarn " : "",
|
||||
n->name.str);
|
||||
str_add(&HDR, s.decl.str, s.decl.len);
|
||||
str_addf(&HDR, "};\n");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue