Generated code for QP version check violates MISRA-C Rule 10.1
Real-Time Embedded Frameworks based on active objects & state machines
Brought to you by:
quantum-leaps
The code generated by QM for checking the QP version compatibility violates MISRA-C:2004 Rule 10.1 "Implicit conversion changes signedness". This violation is reported by PC-Lint, for example:
/* Check for the minimum required QP version */ #if ((QP_VERSION < 630U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))) #error qpc version 6.3.0 or higher required #endif lint:960-> Violates MISRA 2004 Required Rule 10.1, Implicit conversion changes signedness
The problem comes from the "0x3E8" where an 'U' should be added, as well on the QP_VERSION should be defined as an unsigned constant (e.g., 630U).
--MMS
Anonymous
Fixed in QM 4.3.0 and QP 6.3.3.
--MMS