examples: fix `v -cflags "-Werror" test examples/`
parent
82c4daa4b7
commit
4f6306f6d4
|
@ -9,7 +9,7 @@ fn main() {
|
||||||
library_file_path := os.join_path(os.getwd(), dl.get_libname('library'))
|
library_file_path := os.join_path(os.getwd(), dl.get_libname('library'))
|
||||||
handle := dl.open(library_file_path, dl.rtld_lazy)
|
handle := dl.open(library_file_path, dl.rtld_lazy)
|
||||||
eprintln('handle: ${ptr_str(handle)}')
|
eprintln('handle: ${ptr_str(handle)}')
|
||||||
mut f := &FNAdder(0)
|
mut f := FNAdder(0)
|
||||||
f = dl.sym(handle, 'add_1')
|
f = dl.sym(handle, 'add_1')
|
||||||
eprintln('f: ${ptr_str(f)}')
|
eprintln('f: ${ptr_str(f)}')
|
||||||
res := f(1, 2)
|
res := f(1, 2)
|
||||||
|
|
|
@ -249,11 +249,7 @@ fn (mut g Gen) comp_if(node ast.IfExpr) {
|
||||||
}
|
}
|
||||||
g.defer_ifdef = ''
|
g.defer_ifdef = ''
|
||||||
}
|
}
|
||||||
if node.is_expr {
|
g.writeln('#endif')
|
||||||
g.write('#endif')
|
|
||||||
} else {
|
|
||||||
g.writeln('#endif')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut g Gen) comp_if_cond(cond ast.Expr) bool {
|
fn (mut g Gen) comp_if_cond(cond ast.Expr) bool {
|
||||||
|
|
Loading…
Reference in New Issue