ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.85k stars 295 forks source link

SAST: coverity scan : Operands don't affect result #375

Closed raghvendra-dixit closed 1 year ago

raghvendra-dixit commented 2 years ago

As part of coverity scan in file msgpack.go: Details:

  1. The expression's value does not depend on the operands; often, this represents an inadvertent logic error. In github.​com/ugorji/go/codec.​msgpackDecDriver.​DecodeInt64(int64): An operation with non-constant operands that computes a result with constant value
  2. The expression's value does not depend on the operands; often, this represents an inadvertent logic error. In github.​com/ugorji/go/codec.​msgpackDecDriver.​DecodeNaked(): An operation with non-constant operands that computes a result with constant value.
  3. The expression's value does not depend on the operands; often, this represents an inadvertent logic error. In github.​com/ugorji/go/codec.​msgpackDecDriver.​DecodeUint64(uint64): An operation with non-constant operands that computes a result with constant value.
  4. The expression's value does not depend on the operands; often, this represents an inadvertent logic error. In github.​com/ugorji/go/codec.​mpdesc(byte, string): An operation with non-constant operands that computes a result with constant value

Screenshots:

  1. image
  2. image
  3. image
  4. image
ugorji commented 1 year ago

Outdated codebase. Please re-run.