![]() |
|
MISRA-C:2004 Rule 16.7: (Advisory) |
|
||||
![]() | |||||||
For example:
voidmyfunc(int16_t*param1,constint16_t*param2, int16_t*param3)/* param1: Addresses an object which is modified - no const param2: Addresses an object which is not modified - const required param3: Addresses an object which is not modified - const missing */{*param1=*param2+*param3;return;}/* data at address param3 has not been changed, but this is not const therefore not compliant */
QAC messages that encompass this guideline:
| 3673 | The object addressed by the pointer parameter '%s' is not modified and so the pointer could be of type 'pointer to const'. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |