diff --git a/CHANGELOG.md b/CHANGELOG.md index e884c78018..56b4784fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -## V 0.2.4 -*Not yet released* +- Improved `unused variable` warning. Assigning to a variable no longer marks it as used. +- Bare metal support. ## V 0.2.2 - 0.2.3 *22 Jan 2021* diff --git a/vlib/v/doc/doc.v b/vlib/v/doc/doc.v index 031e82483c..bea327f22f 100644 --- a/vlib/v/doc/doc.v +++ b/vlib/v/doc/doc.v @@ -306,7 +306,7 @@ pub fn (mut d Doc) file_ast(file_ast ast.File) map[string]DocNode { } } mut preceeding_comments := []DocComment{} - mut imports_section := true + // mut imports_section := true for sidx, stmt in stmts { if stmt is ast.ExprStmt { // Collect comments @@ -338,7 +338,7 @@ pub fn (mut d Doc) file_ast(file_ast ast.File) map[string]DocNode { d.head.comments << preceeding_comments } preceeding_comments = [] - imports_section = false + // imports_section = false } if stmt is ast.Import { continue diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index 04cc33b720..b13e1ce28d 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -1089,7 +1089,7 @@ pub fn (mut f Fmt) global_decl(node ast.GlobalDecl) { } f.write('__global ') mut max := 0 - mut has_assign := false + // mut has_assign := false if node.is_block { f.writeln('(') f.indent++ @@ -1097,9 +1097,9 @@ pub fn (mut f Fmt) global_decl(node ast.GlobalDecl) { if field.name.len > max { max = field.name.len } - if field.has_expr { - has_assign = true - } + // if field.has_expr { + // has_assign = true + //} } } for field in node.fields {