ndsev / zserio-cpp17

New modern C++17 generator for Zserio
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Redesign all integral promotions in the runtime library to fullfil MISRA rule 7.0.5 #24

Open mikir opened 2 weeks ago

mikir commented 2 weeks ago

The current implementations in the runtime library, mainly in the BitStreamReader and BitStreamWriter violates the MISRA 2023 rule 7.0.5:

"Integral promotion or the usual arithmetic conversions shall not change the type signedness"

This is because the calculations are done mainly using uint8_t type. For more information, please see Zserio issue #605.

It will be necessary to solve all these violations. Unfortunatelly, there is no SonarCloud rule to catch this. We have reported this to the Sonar community and they have created this issue.