From f7530234c777cd2f397800d86d28ade65e0d6a90 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 25 Jul 2019 15:05:44 +0200 Subject: [PATCH] fix Windows build --- compiler/fn.v | 3 +-- compiler/msvc_win.v | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/fn.v b/compiler/fn.v index a9a1aa343f..62d45c9cf5 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -453,10 +453,9 @@ fn (p mut Parser) check_unused_variables() { p.scanner.line_nr = var.line_nr - 1 p.error('`$var.name` declared and not used') } - if !var.is_changed && var.is_mut && !p.pref.is_repl && !var.is_arg && !p.pref.translated && var.name != '_' { p.scanner.line_nr = var.line_nr - 1 - p.error('`$var.name` is declared mutable, but it was never changed') + p.error('`$var.name` is declared as mutable, but it was never changed') } } } diff --git a/compiler/msvc_win.v b/compiler/msvc_win.v index 5a2a54fa81..1e00938355 100644 --- a/compiler/msvc_win.v +++ b/compiler/msvc_win.v @@ -30,7 +30,7 @@ const ( // Given a root key look for the subkey 'version' and get the path fn find_windows_kit_internal(key RegKey, version string) ?string { - mut required_bytes := 0 + required_bytes := 0 // TODO mut result := C.RegQueryValueExW(key, version.to_wide(), 0, 0, 0, &required_bytes) length := required_bytes / 2 @@ -388,4 +388,5 @@ fn build_thirdparty_obj_file_with_msvc(flag string) { res := os.exec('""$msvc.exe_path\\cl.exe" /volatile:ms /Z7 $include_string /c $cfiles /Fo"$obj_path" /D_UNICODE /DUNICODE"') println(res) -} \ No newline at end of file +} +