jaegertracing / jaeger-client-go

🛑 This library is DEPRECATED!
https://jaegertracing.io/
Apache License 2.0
1.39k stars 288 forks source link

Issue found by Svace static analyzer #588

Closed vvdvortsova closed 3 years ago

vvdvortsova commented 3 years ago

Hello This warning found with the Svace. The nil value of AgentEmitBatchArgs_Batch_DEFAULT may be returned in the method GetBatch(), because AgentEmitBatchArgs_Batch_DEFAULT is not initialize in this package. Maybe, it needs to add nil checking. https://github.com/jaegertracing/jaeger-client-go/blob/294ee1ad62d162f3b3f1457184bff788b33afd71/thrift-gen/agent/agent.go#L311 https://github.com/jaegertracing/jaeger-client-go/blob/294ee1ad62d162f3b3f1457184bff788b33afd71/thrift-gen/agent/agent.go#L308

yurishkuro commented 3 years ago

a) this is auto-generated code b) the purpose of this var is not explained, but since it is never assigned, it is always nil and is part of the API