diff --git a/vlib/semver/range.v b/vlib/semver/range.v index 31333c90e5..fd0a76999c 100644 --- a/vlib/semver/range.v +++ b/vlib/semver/range.v @@ -57,13 +57,22 @@ fn (set ComparatorSet) satisfies(ver Version) bool { } fn (c Comparator) satisfies(ver Version) bool { - return match c.op { - .gt { ver.gt(c.ver) } - .lt { ver.lt(c.ver) } - .ge { ver.ge(c.ver) } - .le { ver.le(c.ver) } - .eq { ver.eq(c.ver) } + if c.op == .gt { + return ver.gt(c.ver) } + if c.op == .lt { + return ver.lt(c.ver) + } + if c.op == .ge { + return ver.ge(c.ver) + } + if c.op == .le { + return ver.le(c.ver) + } + if c.op == .eq { + return ver.eq(c.ver) + } + return false } fn parse_range(input string) ?Range { diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index ec3e4d50a3..f96b401fc1 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -205,6 +205,8 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { '-Wno-trigraphs' /* see stackoverflow.com/a/8435413 */, '-Wno-missing-braces' /* see stackoverflow.com/q/13746033 */, // 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 */, '-Wdate-time', '-Wduplicated-branches', '-Wduplicated-cond', @@ -264,8 +266,6 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { '-Wno-enum-conversion' /* used in vlib/sokol, where C enums in C structs are typed as V structs instead */, '-Wno-sometimes-uninitialized' /* produced after exhaustive matches */, '-Wno-int-to-void-pointer-cast', - '-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 */, ] } if ccoptions.is_cc_gcc {