Bug Summary

File:/dev/shm/clang/../sssd/program.c
Location:line 8, column 5
Description:Null pointer passed as an argument to a 'nonnull' parameter

Annotated Source Code

1#include <stdio.h>
2int func(char *str) __attribute__((nonnull));
3
4
5int main(void) {
6 char *str=NULL((void*)0);
1
'str' initialized to a null pointer value
7 printf("before\n");
8 func(str);
2
Null pointer passed as an argument to a 'nonnull' parameter
9 printf("after\n");
10
11 return 0;
12}
13
14
15int func(char *str) {
16 printf(">>%s<<\n", str);
17
18 return 0;
19}