NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
105 stars 34 forks source link

Zephyr Coverity "Operands don't affect result" reports in zcbor generated code #335

Closed rlubos closed 2 months ago

rlubos commented 1 year ago

Hi,

I want to inform, that Coverity ran in Zephyr reported several issues about the code generated by zcbor, for example: https://github.com/zephyrproject-rtos/zephyr/issues/58670

Generally, the code is checking whether the int64_t variable value fits into INT64_MIN/MAX range, which is always true. It's nothing critical, but I wanted you to be aware of this, so you can decide whether it's worth fixing or not.

oyvindronningstad commented 1 year ago

Thanks for the report, I will look into fixing it.