MISRAC2012-Rule-17.13
In this section:
Synopsis
(Required) A function type shall not be type qualified.
Enabled by default
Yes
Severity/Certainty
Low/Medium

Full description
Found a type qualified function type.
Coding standards
- MISRA C:2012 Rule-17.13
(Required) A function type shall not be type qualified
Code examples
The following code example fails the check and will give a warning:
#include <stdint.h> typedef uint16_t ftype (void); typedef const ftype cftype; /* Non-compliant - cftype is const-qualified */
The following code example passes the check and will not give a warning about this issue:
#include <stdint.h> const uint16_t cf (void); /* Compliant - returns const uint16_t */