diff --git a/examples/sokol/particles/modules/particle/system.v b/examples/sokol/particles/modules/particle/system.v index c1e2e491f5..0b41cacaab 100644 --- a/examples/sokol/particles/modules/particle/system.v +++ b/examples/sokol/particles/modules/particle/system.v @@ -41,8 +41,8 @@ pub fn (mut s System) update(dt f64) { moved++ } } - $if trace_moves_spool_to_sbin ? { - if moved != 0 { + if moved != 0 { + $if trace_moves_spool_to_sbin ? { eprintln('${moved:4} particles s.pool -> s.bin') } } @@ -88,8 +88,8 @@ pub fn (mut s System) explode(x f32, y f32) { moved++ reserve-- } - $if trace_moves_sbin_to_spool ? { - if moved != 0 { + if moved != 0 { + $if trace_moves_sbin_to_spool ? { eprintln('${moved:4} particles s.bin -> s.pool') } } diff --git a/examples/sokol/particles/particles.v b/examples/sokol/particles/particles.v index ed5b135026..71b65ca8ec 100644 --- a/examples/sokol/particles/particles.v +++ b/examples/sokol/particles/particles.v @@ -56,8 +56,8 @@ fn (mut a App) run() { init_userdata_cb: init frame_userdata_cb: frame event_userdata_cb: event - window_title: title.str - html5_canvas_name: title.str + window_title: &char(title.str) + html5_canvas_name: &char(title.str) cleanup_userdata_cb: cleanup } sapp.run(&desc) diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index dd9e0757b9..5376c28482 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -159,6 +159,8 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { '-Wno-int-to-pointer-cast', // gcc version of the above '-Wno-trigraphs', // see stackoverflow.com/a/8435413 '-Wno-missing-braces', // see stackoverflow.com/q/13746033 + '-Wno-enum-conversion', // silences `.dst_factor_rgb = sokol__gfx__BlendFactor__one_minus_src_alpha` + '-Wno-enum-compare', // silences `if (ev->mouse_button == sokol__sapp__MouseButton__left) {` // enable additional warnings: '-Wno-unknown-warning', // if a C compiler does not understand a certain flag, it should just ignore it '-Wno-unknown-warning-option', // clang equivalent of the above