![]() |
![]() |
0883 | ![]() |
||||
![]() | |||||||
| Preprocessing | |||||||
The code in this included file does not appear to be protected against repeated inclusion Different strategies may be used when developing a well structured set of include files and sometimes it is difficult to avoid a situation where the same file is included more than once in the same translation unit. In order to guard against such an eventuality, it is customary to surround the content of the include file with preprocessing directives which prevent the content from being preprocessed more than once. Message 0883 is generated when the structure of an included file does not conform to one of the conventional ways in which this kind of protection is implemented. Various forms are recognized by QAC; the most common form is:
#ifndef HFILEX_H #define HFILEX_H ... ... #endif
MISRA-C:2004 Rules applicable to message 0883:
| Rule 19.15 (Required) | Precautions shall be taken in order to prevent the contents of a header file being included twice. |
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |