fix Windows build

pull/1308/head
Alexander Medvednikov 2019-07-25 15:05:44 +02:00
parent 2ac579ca0a
commit f7530234c7
2 changed files with 4 additions and 4 deletions

View File

@ -453,10 +453,9 @@ fn (p mut Parser) check_unused_variables() {
p.scanner.line_nr = var.line_nr - 1 p.scanner.line_nr = var.line_nr - 1
p.error('`$var.name` declared and not used') 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 != '_' { 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.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')
} }
} }
} }

View File

@ -30,7 +30,7 @@ const (
// Given a root key look for the subkey 'version' and get the path // Given a root key look for the subkey 'version' and get the path
fn find_windows_kit_internal(key RegKey, version string) ?string { 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) result := C.RegQueryValueExW(key, version.to_wide(), 0, 0, 0, &required_bytes)
length := required_bytes / 2 length := required_bytes / 2
@ -389,3 +389,4 @@ 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"') res := os.exec('""$msvc.exe_path\\cl.exe" /volatile:ms /Z7 $include_string /c $cfiles /Fo"$obj_path" /D_UNICODE /DUNICODE"')
println(res) println(res)
} }