mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fix -cstrict
This commit is contained in:
parent
b5ee3d374b
commit
af42695d21
2 changed files with 3 additions and 3 deletions
|
@ -628,7 +628,7 @@ fn (mut g Gen) gen_interface_equality_fn(left_type ast.Type) string {
|
|||
|
||||
fn_builder.writeln('${g.static_non_parallel}inline bool ${fn_name}_interface_eq(${ptr_styp} a, ${ptr_styp} b) {')
|
||||
fn_builder.writeln('\tif (${left_arg} == ${right_arg}) {')
|
||||
fn_builder.writeln('\t\tint idx = v_typeof_interface_idx_${idx_fn}(${left_arg});')
|
||||
fn_builder.writeln('\t\tu32 idx = v_typeof_interface_idx_${idx_fn}(${left_arg});')
|
||||
if info is ast.Interface {
|
||||
for typ in info.types {
|
||||
sym := g.table.sym(typ.set_nr_muls(0))
|
||||
|
|
|
@ -1918,7 +1918,7 @@ pub fn (mut g Gen) write_interface_typesymbol_declaration(sym ast.TypeSymbol) {
|
|||
g.type_definitions.writeln('\t\t${vcname}* _${vcname};')
|
||||
}
|
||||
g.type_definitions.writeln('\t};')
|
||||
g.type_definitions.writeln('\tint _typ;')
|
||||
g.type_definitions.writeln('\tu32 _typ;')
|
||||
for field in info.fields {
|
||||
styp := g.styp(field.typ)
|
||||
cname := c_name(field.name)
|
||||
|
@ -6975,7 +6975,7 @@ fn (mut g Gen) write_types(symbols []&ast.TypeSymbol) {
|
|||
g.type_definitions.writeln('\t\t${var_type} _${variant_name};')
|
||||
}
|
||||
g.type_definitions.writeln('\t};')
|
||||
g.type_definitions.writeln('\tint _typ;')
|
||||
g.type_definitions.writeln('\tu32 _typ;')
|
||||
if sym.info.fields.len > 0 {
|
||||
g.writeln('\t// pointers to common sumtype fields')
|
||||
for field in sym.info.fields {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue