...
Do not reuse standard header file names, system specific header file names, or other header file names.
Non-Compliant Code Example
In this NCCE the programmer chooses to use a local version of the standard library, but does not make the change clear.
Code Block | ||
---|---|---|
| ||
#include "stdio.h"
/* ... */
|
Compliant Solution
Wiki Markup |
---|
The solution addresses the problem by giving the local library a unique name (as per \[[PRE08-A. Guarantee that header filenames are unique]\]) which makes it explicit that the library used is not the original. |
Code Block | ||
---|---|---|
| ||
#include "mystdio.h"
/* ... */
|
Risk Assessment
Using header names that conflict with the C standard library functions can result in not including the intended file.
...