![]() |
![]() |
3004 | ![]() |
||||
![]() | |||||||
| Pointers | REFERENCE - ISO:C90-6.2.2.3 Pointers, ISO:C99-6.3.2.3 Pointers | ||||||
ISO:C Standard allows 2 forms of a null pointer constant:
/* PRQA S 1-9999 ++ */
/* PRQA S 3004 -- */
#define NULL (void *)0
void foo (void *);
void f3004 (void)
{
char *p = NULL; /* OK */
p = 0; /* Message 3004 */
if (p == 0) { } /* Message 3004 */
if (0 != p) { } /* Message 3004 */
foo (0); /* Message 3004 */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |