When building the project with the Renesas CC-RX compiler, several compiler warnings are reported.
The warnings are related to stricter type checking around enum and integer conversions, in particular:
- enumerated type mixed with another type
- integer conversion resulted in a change of sign
- enumeration value not handled in switch
The affected areas include:
- firmware transfer request status checking
- the global CSMP library service status variable
- response status handling in
cgmsagent.c
- protobuf wire type assignment in the vendored protobuf-c code
The proposed fix is to make the relevant type conversions explicit, use the proper enum type for the CSMP library status, and add an explicit default case to the affected switch statement.
The intended behavior is unchanged. The goal is only to make the code compile cleanly with CC-RX and avoid warnings caused by implicit enum/integer conversions.
When building the project with the Renesas CC-RX compiler, several compiler warnings are reported.
The warnings are related to stricter type checking around enum and integer conversions, in particular:
The affected areas include:
cgmsagent.cThe proposed fix is to make the relevant type conversions explicit, use the proper enum type for the CSMP library status, and add an explicit
defaultcase to the affected switch statement.The intended behavior is unchanged. The goal is only to make the code compile cleanly with CC-RX and avoid warnings caused by implicit enum/integer conversions.