Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: remove redundant err declarations #3855

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmd/dlv/dlv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,6 @@ func TestUnixDomainSocket(t *testing.T) {

listenPath := filepath.Join(tmpdir, "delve_test")

var err error

dlvbin := protest.GetDlvBinary(t)
defer os.Remove(dlvbin)

Expand Down
1 change: 0 additions & 1 deletion pkg/proc/breakpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ func (bpstate *BreakpointState) checkCond(tgt *Target, breaklet *Breaklet, threa
case StepBreakpoint, NextBreakpoint, NextDeferBreakpoint:
nextDeferOk := true
if breaklet.Kind&NextDeferBreakpoint != 0 {
var err error
frames, err := ThreadStacktrace(tgt, thread, 2)
if err == nil {
nextDeferOk, _ = isPanicCall(frames)
Expand Down
1 change: 0 additions & 1 deletion service/dap/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,6 @@ func (s *Session) stopDebugSession(killProcess bool) error {
if s.debugger == nil {
return nil
}
var err error
var exited error
// Halting will stop any debugger command that's pending on another
// per-request goroutine. Tell auto-resumer not to resume, so the
Expand Down
1 change: 0 additions & 1 deletion service/debugger/debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,6 @@ func (d *Debugger) convertStacktrace(rawlocs []proc.Stackframe, cfg *proc.LoadCo
frame.Err = rawlocs[i].Err.Error()
}
if cfg != nil && rawlocs[i].Current.Fn != nil {
var err error
scope := proc.FrameToScope(d.target.Selected, d.target.Selected.Memory(), nil, 0, rawlocs[i:]...)
locals, err := scope.LocalVariables(*cfg)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion service/rpc1/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ type DisassembleRequest struct {
}

func (s *RPCServer) Disassemble(args DisassembleRequest, answer *api.AsmInstructions) error {
var err error
insts, err := s.debugger.Disassemble(args.Scope.GoroutineID, args.StartPC, args.EndPC)
if err != nil {
return err
Expand Down
3 changes: 0 additions & 3 deletions service/rpc2/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ func (s *RPCServer) Stacktrace(arg StacktraceIn, out *StacktraceOut) error {
if arg.Defers {
arg.Opts |= api.StacktraceReadDefers
}
var err error
rawlocs, err := s.debugger.Stacktrace(arg.Id, arg.Depth, arg.Opts)
if err != nil {
return err
Expand Down Expand Up @@ -781,7 +780,6 @@ type DisassembleOut struct {
//
// Disassemble will also try to calculate the destination address of an absolute indirect CALL if it happens to be the instruction the selected goroutine is stopped at.
func (s *RPCServer) Disassemble(arg DisassembleIn, out *DisassembleOut) error {
var err error
insts, err := s.debugger.Disassemble(arg.Scope.GoroutineID, arg.StartPC, arg.EndPC)
if err != nil {
return err
Expand Down Expand Up @@ -828,7 +826,6 @@ type ListCheckpointsOut struct {
}

func (s *RPCServer) ListCheckpoints(arg ListCheckpointsIn, out *ListCheckpointsOut) error {
var err error
cps, err := s.debugger.Checkpoints()
if err != nil {
return err
Expand Down