File: | /dev/shm/clang/../sssd/program.c |
Location: | line 8, column 5 |
Description: | Null pointer passed as an argument to a 'nonnull' parameter |
1 | #include <stdio.h> | |||
2 | int func(char *str) __attribute__((nonnull)); | |||
3 | ||||
4 | ||||
5 | int main(void) { | |||
6 | char *str=NULL((void*)0); | |||
| ||||
7 | printf("before\n"); | |||
8 | func(str); | |||
| ||||
9 | printf("after\n"); | |||
10 | ||||
11 | return 0; | |||
12 | } | |||
13 | ||||
14 | ||||
15 | int func(char *str) { | |||
16 | printf(">>%s<<\n", str); | |||
17 | ||||
18 | return 0; | |||
19 | } |