Fixes to appease go static checker#1589
Conversation
| // fmt.Errorf("event %s already registered", eh.Type()) | ||
| } | ||
| registeredInterfaceProviders[eh.Type()] = eh | ||
| return |
There was a problem hiding this comment.
Unnecessary return removed
| err = dg.ApplicationDelete(ap.ID) | ||
| log.Printf("Delete: err: %+v\n", err) | ||
|
|
||
| return |
There was a problem hiding this comment.
Unnecessary return removed
| oldCopy := *old | ||
| t.BeforeUpdate = &oldCopy | ||
| } | ||
| err = s.ChannelAdd(t.Channel) |
There was a problem hiding this comment.
This error value is never used
| oldCopy := *old | ||
| t.BeforeUpdate = &oldCopy | ||
| } | ||
| err = s.ChannelAdd(t.Channel) |
There was a problem hiding this comment.
This error value is never used
There was a problem hiding this comment.
I think it's better to fix the shadowing rather than its consequences.
| v.log(LogDebug, "unknown voice operation, %d, %s", e.Operation, string(e.RawData)) | ||
| } | ||
|
|
||
| return |
There was a problem hiding this comment.
Unnecessary return removed
| sequence++ | ||
| } | ||
|
|
||
| if (timestamp + uint32(size)) >= 0xFFFFFFFF { |
There was a problem hiding this comment.
The value given is greater than the max value of Uint32 which is impossible. Instead, we should check for integer ovrflow.
|
@FedorLap2006 @bwmarrin bump |
|
@FedorLap2006 Can you merge please? I don't have merge perms |
| oldCopy := *old | ||
| t.BeforeUpdate = &oldCopy | ||
| } | ||
| err = s.ChannelAdd(t.Channel) |
There was a problem hiding this comment.
I think it's better to fix the shadowing rather than its consequences.
Resolve some complaints from the static go checker