Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this noncompliant code example, the programmer chooses to use a local version of the standard library but does not make the change clear.

Code Block
bgColor#FFcccc
langc#ffcccc
#include "stdio.h"  /* confusing, distinct from <stdio.h> */

/* ... */

...

The solution addresses the problem by giving the local library a unique name (per recommendation PRE08-C. Guarantee that header file names are unique), which makes it apparent that the library used is not the original.

Code Block
bgColor#ccccFF
lang#ccccffc
/* Using a local version of stdio.h */ 
#include "mystdio.h"

/* ... */

...