MISRA Error for Optimized Rte Interface Implemented by a Macro
In general, the Rte API is generated in a way to use macros and generated API functions in order to provide specified access to each end-point of communication (e.g. SWCs). Additionally, not only the standardized APIs, but also runtime and memory efficiency are the goal to archive.
The comma operator is a very efficient way to execute functionality, whose intermediate results are not worth to analyze, e.g. #define setPointerRefToOne(data) (*(data)=1, ((Std_ReturnType)E_OK) /*example macro*/). In case of tool-generated macros, the problem of being error-prone does not apply. Additionally, since it is used as macro the readability of the code fragment is not affected as well.
: MISRA C:2012 Guidelines for the use of the C language in critical systems (March 2013)
Please complete all required fields. Fields marked with * are required.