TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Rule:  6.7.8.dChecked automatically with code checker

Synopsis:All variables containing a pointer shall be initialized.
Language:C
Severity Level:6
Category:Declarations


Description:

Justification

In this way uninitialized memory is banned out.

Example

int*  i; /* WRONG, pointer not initialized */
int*  j = NULL; /* RIGHT */
  
typedef struct Foo { 
    int* x;
} Foo;
 
Foo foo1; /* WRONG, struct containing pointer not initialized */
Foo foo2 = {0}; /* RIGHT, struct initialized */