Lines Matching refs:scanf
30 int scanf(const char * restrict, ...) ;
39 scanf(s, i); // expected-warning{{format string is not a string literal}} in test()
40 scanf("%0d", i); // expected-warning{{zero field width in scanf format string is unused}} in test()
41 scanf("%00d", i); // expected-warning{{zero field width in scanf format string is unused}} in test()
42 …scanf("%d%[asdfasdfd", i, s); // expected-warning{{no closing ']' for '%[' in scanf format string}} in test()
45 scanf ("%" "hu" "\n", &s_x); // no-warning in test()
46 scanf("%y", i); // expected-warning{{invalid conversion specifier 'y'}} in test()
47 scanf("%%"); // no-warning in test()
48 scanf("%%%1$d", i); // no-warning in test()
49 scanf("%1$d%%", i); // no-warning in test()
50 scanf("%d", i, i); // expected-warning{{data argument not used by format string}} in test()
51 scanf("%*d", i); // // expected-warning{{data argument not used by format string}} in test()
52 scanf("%*d", i); // // expected-warning{{data argument not used by format string}} in test()
53 scanf("%*d%1$d", i); // no-warning in test()
55 scanf("%s", (char*)0); // no-warning in test()
56 scanf("%s", (volatile char*)0); // no-warning in test()
57 scanf("%s", (signed char*)0); // no-warning in test()
58 scanf("%s", (unsigned char*)0); // no-warning in test()
59 scanf("%hhu", (signed char*)0); // no-warning in test()
63 …scanf("%hhs", "foo"); // expected-warning{{length modifier 'hh' results in undefined behavior or n… in bad_length_modifiers()
64 …scanf("%1$zp", &p); // expected-warning{{length modifier 'z' results in undefined behavior or no e… in bad_length_modifiers()
65 scanf("%ls", ws); // no-warning in bad_length_modifiers()
66 scanf("%#.2Lf", ld); // expected-warning{{invalid conversion specifier '#'}} in bad_length_modifiers()
75 scanf(kFormat1, i); // expected-warning{{zero field width in scanf format string is unused}} in pr9751()
76 scanf("%00d", i); // expected-warning{{zero field width in scanf format string is unused}} in pr9751()
78 scanf(kFormat2, str); // expected-warning{{no closing ']' for '%[' in scanf format string}} in pr9751()
79 scanf("%[", str); // expected-warning{{no closing ']' for '%[' in scanf format string}} in pr9751()
81 …scanf(kFormat3, &i); // expected-warning {{format specifies type 'unsigned short *' but the argume… in pr9751()
83 …scanf(kFormat4, &i); // expected-warning {{length modifier 'l' results in undefined behavior or no… in pr9751()
103 …scanf("%[abc]", ip); // expected-warning{{format specifies type 'char *' but the argument has type… in test_scanlist()
104 …scanf("%h[abc]", sp); // expected-warning{{length modifier 'h' results in undefined behavior or no… in test_scanlist()
105 scanf("%l[xyx]", ls); // no-warning in test_scanlist()
106 …scanf("%ll[xyx]", ls); // expected-warning {{length modifier 'll' results in undefined behavior or… in test_scanlist()
109 scanf("%[]% ]", sp); // no-warning in test_scanlist()
110 scanf("%[^]% ]", sp); // no-warning in test_scanlist()
111 scanf("%[a^]% ]", sp); // expected-warning {{invalid conversion specifier ' '}} in test_scanlist()
118 …scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type '… in test_alloc_extension()
119 …scanf("%aS", lsp); // expected-warning{{format specifies type 'float *' but the argument has type … in test_alloc_extension()
120 …scanf("%a[bcd]", sp); // expected-warning{{format specifies type 'float *' but the argument has ty… in test_alloc_extension()
124 scanf("%ms", sp); // No warning. in test_alloc_extension()
125 scanf("%mS", lsp); // No warning. in test_alloc_extension()
126 scanf("%mc", sp); // No warning. in test_alloc_extension()
127 scanf("%mC", lsp); // No warning. in test_alloc_extension()
128 scanf("%m[abc]", sp); // No warning. in test_alloc_extension()
129 …scanf("%md", sp); // expected-warning{{length modifier 'm' results in undefined behavior or no eff… in test_alloc_extension()
132 …scanf("%ms", fp); // expected-warning{{format specifies type 'char **' but the argument has type '… in test_alloc_extension()
133 …scanf("%mS", fp); // expected-warning-re{{format specifies type 'wchar_t **' (aka '{{[^']+}}') but… in test_alloc_extension()
134 …scanf("%mc", fp); // expected-warning{{format specifies type 'char **' but the argument has type '… in test_alloc_extension()
135 …scanf("%mC", fp); // expected-warning-re{{format specifies type 'wchar_t **' (aka '{{[^']+}}') but… in test_alloc_extension()
136 …scanf("%m[abc]", fp); // expected-warning{{format specifies type 'char **' but the argument has ty… in test_alloc_extension()
140 …scanf("%qd", x); // expected-warning{{format specifies type 'long long *' but the argument has typ… in test_quad()
141 scanf("%qd", llx); // no-warning in test_quad()
145 …scanf("%n", (void*)0); // expected-warning{{format specifies type 'int *' but the argument has typ… in test_writeback()
146 …scanf("%n %c", x, x); // expected-warning{{format specifies type 'char *' but the argument has typ… in test_writeback()
148 scanf("%hhn", (signed char*)0); // no-warning in test_writeback()
149 scanf("%hhn", (char*)0); // no-warning in test_writeback()
150 scanf("%hhn", (unsigned char*)0); // no-warning in test_writeback()
151 …scanf("%hhn", (int*)0); // expected-warning{{format specifies type 'signed char *' but the argumen… in test_writeback()
153 scanf("%hn", (short*)0); // no-warning in test_writeback()
154 scanf("%hn", (unsigned short*)0); // no-warning in test_writeback()
155 …scanf("%hn", (int*)0); // expected-warning{{format specifies type 'short *' but the argument has t… in test_writeback()
157 scanf("%n", (int*)0); // no-warning in test_writeback()
158 scanf("%n", (unsigned int*)0); // no-warning in test_writeback()
159 …scanf("%n", (char*)0); // expected-warning{{format specifies type 'int *' but the argument has typ… in test_writeback()
161 scanf("%ln", (long*)0); // no-warning in test_writeback()
162 scanf("%ln", (unsigned long*)0); // no-warning in test_writeback()
163 …scanf("%ln", (int*)0); // expected-warning{{format specifies type 'long *' but the argument has ty… in test_writeback()
165 scanf("%lln", (long long*)0); // no-warning in test_writeback()
166 scanf("%lln", (unsigned long long*)0); // no-warning in test_writeback()
167 …scanf("%lln", (int*)0); // expected-warning{{format specifies type 'long long *' but the argument … in test_writeback()
169 scanf("%qn", (long long*)0); // no-warning in test_writeback()
170 scanf("%qn", (unsigned long long*)0); // no-warning in test_writeback()
171 …scanf("%qn", (int*)0); // expected-warning{{format specifies type 'long long *' but the argument h… in test_writeback()
178 …scanf("%d", cip); // expected-warning{{format specifies type 'int *' but the argument has type 'co… in test_qualifiers()
179 …scanf("%n", cip); // expected-warning{{format specifies type 'int *' but the argument has type 'co… in test_qualifiers()
180 …scanf("%s", ccp); // expected-warning{{format specifies type 'char *' but the argument has type 'c… in test_qualifiers()
181 …scanf("%d", cvip); // expected-warning{{format specifies type 'int *' but the argument has type 'c… in test_qualifiers()
183 scanf("%d", vip); // No warning. in test_qualifiers()
184 scanf("%n", vip); // No warning. in test_qualifiers()
185 scanf("%c", vcp); // No warning. in test_qualifiers()
189 scanf("%d", (ip_t)0); // No warning. in test_qualifiers()
190 …scanf("%d", (cip_t)0); // expected-warning{{format specifies type 'int *' but the argument has typ… in test_qualifiers()
195 scanf("%zu", &s); // No warning. in test_size_types()
198 …scanf("%zu", &d1); // expected-warning-re{{format specifies type 'size_t *' (aka '{{.+}}') but the… in test_size_types()
201 scanf("%zd", &s); // No warning. in test_size_types()
204 …scanf("%zd", &d2); // expected-warning-re{{format specifies type 'ssize_t *' (aka '{{.+}}') but th… in test_size_types()
207 scanf("%zn", &sn); // No warning. in test_size_types()
210 …scanf("%zn", &d3); // expected-warning-re{{format specifies type 'ssize_t *' (aka '{{.+}}') but th… in test_size_types()
215 scanf("%tu", &p1); // No warning. in test_ptrdiff_t_types()
218 …scanf("%tu", &d1); // expected-warning-re{{format specifies type 'unsigned ptrdiff_t *' (aka '{{.+… in test_ptrdiff_t_types()
221 scanf("%td", &p2); // No warning. in test_ptrdiff_t_types()
224 …scanf("%td", &d2); // expected-warning-re{{format specifies type 'ptrdiff_t *' (aka '{{.+}}') but … in test_ptrdiff_t_types()
227 scanf("%tn", &p3); // No warning. in test_ptrdiff_t_types()
230 …scanf("%tn", &d3); // expected-warning-re{{format specifies type 'ptrdiff_t *' (aka '{{.+}}') but … in test_ptrdiff_t_types()
234 scanf(0 ? "%s" : "%d", i); // no warning in check_conditional_literal()
235 scanf(1 ? "%s" : "%d", i); // expected-warning{{format specifies type 'char *'}} in check_conditional_literal()
236 scanf(0 ? "%d %d" : "%d", i); // no warning in check_conditional_literal()
237 scanf(1 ? "%d %d" : "%d", i); // expected-warning{{more '%' conversions than data arguments}} in check_conditional_literal()
238 scanf(0 ? "%d %d" : "%d", i, s); // expected-warning{{data argument not used}} in check_conditional_literal()
239 scanf(1 ? "%d %s" : "%d", i, s); // no warning in check_conditional_literal()
240 scanf(i ? "%d %s" : "%d", i, s); // no warning in check_conditional_literal()
241 scanf(i ? "%d" : "%d", i, s); // expected-warning{{data argument not used}} in check_conditional_literal()
242 scanf(i ? "%s" : "%d", s); // expected-warning{{format specifies type 'int *'}} in check_conditional_literal()