diff --git a/go/pointer/hvn.go b/go/pointer/hvn.go index 812b8a31..48051ae7 100644 --- a/go/pointer/hvn.go +++ b/go/pointer/hvn.go @@ -533,7 +533,7 @@ func (h *hvn) markIndirectNodes() { if tArray, ok := h.a.nodes[id].typ.(*types.Array); ok { // Mark the array element nodes indirect. // (Skip past the identity field.) - for _ = range h.a.flatten(tArray.Elem()) { + for range h.a.flatten(tArray.Elem()) { id++ h.markIndirect(onodeid(id), "array elem") } diff --git a/go/pointer/testdata/channels.go b/go/pointer/testdata/channels.go index 76eb5f8c..377b68a5 100644 --- a/go/pointer/testdata/channels.go +++ b/go/pointer/testdata/channels.go @@ -86,7 +86,7 @@ func chan4() { print(k) // @pointsto main.incr } // Exercise constraint generation (regtest for a crash). - for _ = range chA { + for range chA { } } diff --git a/go/ssa/builder.go b/go/ssa/builder.go index 111bc334..5029f0e0 100644 --- a/go/ssa/builder.go +++ b/go/ssa/builder.go @@ -154,7 +154,7 @@ func (b *builder) logicalBinop(fn *Function, e *ast.BinaryExpr) Value { // All edges from e.X to done carry the short-circuit value. var edges []Value - for _ = range done.Preds { + for range done.Preds { edges = append(edges, short) }