1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

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))')