ci: fix `./v -cc gcc -cflags "-Werror" vlib/io/os_file_reader_test.v`

pull/8796/head
Delyan Angelov 2021-02-17 00:40:10 +02:00
parent fb09333a73
commit 995e1c84a2
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 6 additions and 3 deletions

View File

@ -5036,10 +5036,13 @@ fn (mut g Gen) struct_init(struct_init ast.StructInit) {
if is_multiline {
g.indent--
}
// if struct_init.fields.len == 0 && info.fields.len == 0 {
if !initialized {
g.write('\n#ifndef __cplusplus\n0\n#endif\n')
if g.pref.ccompiler == 'msvc' {
if !initialized {
g.write('\n#ifndef __cplusplus\n0\n#endif\n')
}
}
g.write('}')
if g.is_shared && !g.inside_opt_data && !g.is_array_set {
g.write('}, sizeof($shared_styp))')