Lines Matching refs:p
13 void f1(int *p) { in f1() argument
14 if (p) *p = 1; in f1()
15 else *p = 0; // expected-warning{{ereference}} in f1()
22 int f2(struct foo_struct* p) { in f2() argument
24 if (p) in f2()
25 p->x = 1; in f2()
27 …return p->x++; // expected-warning{{Access to field 'x' results in a dereference of a null pointer… in f2()
50 int f4(int *p) { in f4() argument
52 uintptr_t x = (uintptr_t) p; in f4()
64 short *p = x; // expected-warning{{incompatible integer to pointer conversion}} in f4_b() local
67 if (!(p == &array[0])) { in f4_b()
68 p = 0; in f4_b()
69 *p = 1; // no-warning in f4_b()
72 if (p) { in f4_b()
73 *p = 5; // no-warning in f4_b()
74 p = 0; in f4_b()
78 *p += 10; // expected-warning{{Dereference of null pointer}} in f4_b()
88 int bar(int* p, int q) __attribute__((nonnull));
90 int f6(int *p) { in f6() argument
91 …return !p ? bar(p, 1) // expected-warning {{Null pointer passed as an argument to a 'nonnull' para… in f6()
92 : bar(p, 0); // no-warning in f6()
95 int bar2(int* p, int q) __attribute__((nonnull(1)));
97 int f6b(int *p) { in f6b() argument
98 …return !p ? bar2(p, 1) // expected-warning {{Null pointer passed as an argument to a 'nonnull' par… in f6b()
99 : bar2(p, 0); // no-warning in f6b()
102 int bar3(int*p, int q, int *r) __attribute__((nonnull(1,3)));
104 int f6c(int *p, int *q) { in f6c() argument
105 …return !p ? bar3(q, 2, p) // expected-warning {{Null pointer passed as an argument to a 'nonnull' … in f6c()
106 : bar3(p, 2, q); // no-warning in f6c()
109 void f6d(int *p) { in f6d() argument
110 bar(p, 0); in f6d()
112 if (!p) { in f6d()
118 void f6e(int *p, int offset) { in f6e() argument
120 bar((p+offset)+1, 0); // not crash in f6e()
127 int* p = 0; in f7() local
130 p = qux(); in f7()
133 *p = 1; // no-warning in f7()
140 int* p = 0; in f7b() local
143 p = qux(); in f7b()
146 *p = 1; // no-warning in f7b()
153 int* p = 0; in f7c() local
156 p = qux(); in f7c()
162 *p = 1; // no-warning in f7c()
168 int* p = 0; in f7c2() local
171 p = qux(); in f7c2()
176 *p = 1; // expected-warning{{null}} in f7c2()
181 void f8(int *p, int *q) { in f8() argument
182 if (!p) in f8()
183 if (p) in f8()
184 *p = 1; // no-warning in f8()
195 int *p = 0; in f9() local
199 p = qux(i); in f9()
201 return *p++; // no-warning in f9()
206 int *p = 0; in f9b() local
210 p = qux(i); in f9b()
212 return *p++; // no-warning in f9b()
215 int* f10(int* p, signed char x, int y) { in f10() argument
224 if (!p) return 0; in f10()
225 *p = 10; in f10()
227 else p = 0; in f10()
230 *p = 5; // no-warning in f10()
232 return p; in f10()
263 char *p = 0; in f12() local
266 p = q; in f12()
274 *p = 1; // no-warning in f12()
285 void pr4759_aux(int *p) __attribute__((nonnull));
288 int *p; in pr4759() local
289 pr4759_aux(p); // expected-warning{{Function call argument is an uninitialized value}} in pr4759()
308 int *p = 0; in foo10595327() local
311 return *p; // no-warning in foo10595327()