[previous] 0883 [next] Include file code is not protected against repeated inclusion
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 QA·C; the most common form is:

#ifndef HFILEX_H
#define HFILEX_H
...
...
#endif

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents