Skip to content

Commit

Permalink
checker: improve unused label check
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Jul 22, 2022
1 parent 4d3401c commit d6de533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/builtin/builtin_windows.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn print_backtrace_skipping_top_frames_msvc(skipframes int) bool {
lnumber := sline64.f_line_number
lineinfo = '$file_name:$lnumber'
} else {
addr:
// addr:
lineinfo = '?? : address = 0x${(&frame_addr):x}'
}
sfunc := unsafe { tos3(fname) }
Expand Down
1 change: 1 addition & 0 deletions vlib/v/checker/checker.v
Original file line number Diff line number Diff line change
Expand Up @@ -3915,6 +3915,7 @@ fn (mut c Checker) check_unused_labels() {
if nr_uses == 0 {
// TODO show label's location
c.warn('label `$label` defined and not used', token.Pos{})
c.goto_labels[label]++ // so that this warning is not shown again
}
}
}
Expand Down

0 comments on commit d6de533

Please sign in to comment.