Lines Matching defs:buffer
12 char *buffer = NULL;
14 if (getline(&buffer, &n, F1) > 0) {
15 char c = buffer[0]; // ok
17 free(buffer);
27 char *buffer = malloc(n);
28 char *ptr = buffer;
30 ssize_t r = getdelim(&buffer, &n, '\r', F1);
33 free(buffer); // ok
42 char *buffer = alloca(n);
43 getline(&buffer, &n, F1); // expected-warning {{Memory allocated by 'alloca()' should not be deallocated}}
52 char *buffer = (char*)test_getline_invalid_ptr;
53 getline(&buffer, &n, F1); // expected-warning {{Argument to 'getline()' is the address of the function 'test_getline_invalid_ptr', which is not memory allocated by 'malloc()'}}
62 char *buffer = NULL;
66 while ((read = getline(&buffer, &n, F1)) != -1) {
67 printf("%s\n", buffer);
75 char buffer[10];
76 char *ptr = buffer;
82 getline(&ptr, &n, F1); // expected-warning {{Argument to 'getline()' is the address of the local variable 'buffer', which is not memory allocated by 'malloc()'}}
87 static char buffer[10];
88 char *ptr = buffer;
94 getline(&ptr, &n, F1); // expected-warning {{Argument to 'getline()' is the address of the static variable 'buffer', which is not memory allocated by 'malloc()'}}