Home
last modified time | relevance | path

Searched refs:scanf (Results 1 – 25 of 135) sorted by relevance

123456

/external/clang/test/Sema/
Dformat-strings-scanf.c12 int scanf(const char * restrict, ...) ;
21 scanf(s, i); // expected-warning{{format string is not a string literal}} in test()
22 scanf("%0d", i); // expected-warning{{zero field width in scanf format string is unused}} in test()
23 scanf("%00d", i); // expected-warning{{zero field width in scanf format string is unused}} in test()
24scanf("%d%[asdfasdfd", i, s); // expected-warning{{no closing ']' for '%[' in scanf format string}} in test()
27 scanf ("%" "hu" "\n", &s_x); // no-warning in test()
28 scanf("%y", i); // expected-warning{{invalid conversion specifier 'y'}} in test()
29 scanf("%%"); // no-warning in test()
30 scanf("%%%1$d", i); // no-warning in test()
31 scanf("%1$d%%", i); // no-warning in test()
[all …]
Dformat-strings-fixit.c99 int scanf(char const *, ...);
123 scanf("%lf", str); in test2()
124 scanf("%lf", vstr); in test2()
125 scanf("%ls", str); in test2()
126 scanf("%ls", str); in test2()
129 scanf("%f", &shortVar); in test2()
130 scanf("%f", &uShortVar); in test2()
131 scanf("%p", &intVar); in test2()
132 scanf("%f", intAVar); in test2()
133 scanf("%f", intSAParm); in test2()
[all …]
Dformat-strings-ms.c5 int scanf(const char * restrict, ...) ;
44 scanf("%wc", &c); in w_test()
45 scanf("%wC", &c); in w_test()
46 scanf("%C", &c); in w_test()
47 scanf("%ws", s); in w_test()
48 scanf("%wS", s); in w_test()
49 scanf("%S", s); in w_test()
58scanf("%wc", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *'… in w_test()
59scanf("%wC", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *'… in w_test()
60scanf("%C", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *')… in w_test()
[all …]
Dformat-strings-c90.c4 int scanf(const char * restrict, ...);
8 scanf("%as", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo()
9 scanf("%a[abc]", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo()
12 scanf("%a", fp); in foo()
13 scanf("%afoobar", fp); in foo()
20 scanf("%da", ip); in foo()
23scanf("%as", fp); /* expected-warning{{format specifies type 'char **' but the argument has type '… in foo()
25scanf("%aS", fp); /* expected-warning{{format specifies type 'wchar_t **' (aka 'int **') but the a… in foo()
28scanf("%a[abc]", fp); /* expected-warning{{format specifies type 'char **' but the argument has ty… in foo()
Dformat-strings-int-typedefs.c4 int scanf(char const *, ...);
16 scanf("%jd", 0); // expected-warning {{format specifies type 'intmax_t *' (aka 'long long *')}} in test()
17scanf("%ju", 0); // expected-warning {{format specifies type 'uintmax_t *' (aka 'unsigned long lon… in test()
18 scanf("%zu", 0); // expected-warning {{format specifies type 'size_t *' (aka 'unsigned long *')}} in test()
19 scanf("%td", 0); // expected-warning {{format specifies type 'ptrdiff_t *' (aka 'int *')}} in test()
20 scanf("%lc", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
21 scanf("%ls", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
22 scanf("%S", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
23 scanf("%C", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
Dformat-strings-gnu.c10 int scanf(const char * restrict, ...) ;
51 scanf("%Ld", y); // no-warning in scanf_longlong()
52 scanf("%Lu", y); // no-warning in scanf_longlong()
53 scanf("%Lx", y); // no-warning in scanf_longlong()
54 scanf("%Ld", x); // no-warning in scanf_longlong()
55 scanf("%Lu", x); // no-warning in scanf_longlong()
56 scanf("%Lx", x); // no-warning in scanf_longlong()
57scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or … in scanf_longlong()
Dformat-strings-darwin.c11 int scanf(const char * restrict, ...) ;
57scanf("%hD", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
58scanf("%lD", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
59scanf("%hU", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
60scanf("%lU", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
61scanf("%hO", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
62scanf("%lO", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
/external/llvm-project/clang/test/Sema/
Dformat-strings-scanf.c30 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()
42scanf("%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()
[all …]
Dformat-strings-fixit.c99 int scanf(char const *, ...);
123 scanf("%lf", str); in test2()
124 scanf("%lf", vstr); in test2()
125 scanf("%ls", str); in test2()
126 scanf("%ls", str); in test2()
129 scanf("%f", &shortVar); in test2()
130 scanf("%f", &uShortVar); in test2()
131 scanf("%p", &intVar); in test2()
132 scanf("%f", intAVar); in test2()
133 scanf("%f", intSAParm); in test2()
[all …]
Dformat-strings-ms.c5 int scanf(const char * restrict, ...) ;
44 scanf("%wc", &c); in w_test()
45 scanf("%wC", &c); in w_test()
46 scanf("%C", &c); in w_test()
47 scanf("%ws", s); in w_test()
48 scanf("%wS", s); in w_test()
49 scanf("%S", s); in w_test()
58scanf("%wc", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *'… in w_test()
59scanf("%wC", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *'… in w_test()
60scanf("%C", &bad); // expected-warning{{format specifies type 'wchar_t *' (aka 'unsigned short *')… in w_test()
[all …]
Dformat-strings-c90.c4 int scanf(const char * restrict, ...);
8 scanf("%as", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo()
9 scanf("%a[abc]", sp); /* expected-warning{{'a' length modifier is not supported by ISO C}} */ in foo()
12 scanf("%a", fp); in foo()
13 scanf("%afoobar", fp); in foo()
20 scanf("%da", ip); in foo()
23scanf("%as", fp); /* expected-warning{{format specifies type 'char **' but the argument has type '… in foo()
25scanf("%aS", fp); /* expected-warning{{format specifies type 'wchar_t **' (aka 'int **') but the a… in foo()
28scanf("%a[abc]", fp); /* expected-warning{{format specifies type 'char **' but the argument has ty… in foo()
Dformat-strings-int-typedefs.c4 int scanf(char const *, ...);
16 scanf("%jd", 0); // expected-warning {{format specifies type 'intmax_t *' (aka 'long long *')}} in test()
17scanf("%ju", 0); // expected-warning {{format specifies type 'uintmax_t *' (aka 'unsigned long lon… in test()
18 scanf("%zu", 0); // expected-warning {{format specifies type 'size_t *' (aka 'unsigned long *')}} in test()
19 scanf("%td", 0); // expected-warning {{format specifies type 'ptrdiff_t *' (aka 'int *')}} in test()
20 scanf("%lc", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
21 scanf("%ls", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
22 scanf("%S", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
23 scanf("%C", 0); // expected-warning {{format specifies type 'wchar_t *' (aka 'int *')}} in test()
Dformat-strings-gnu.c10 int scanf(const char * restrict, ...) ;
51 scanf("%Ld", y); // no-warning in scanf_longlong()
52 scanf("%Lu", y); // no-warning in scanf_longlong()
53 scanf("%Lx", y); // no-warning in scanf_longlong()
54 scanf("%Ld", x); // no-warning in scanf_longlong()
55 scanf("%Lu", x); // no-warning in scanf_longlong()
56 scanf("%Lx", x); // no-warning in scanf_longlong()
57scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or … in scanf_longlong()
Dformat-strings-darwin.c11 int scanf(const char * restrict, ...) ;
57scanf("%hD", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
58scanf("%lD", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
59scanf("%hU", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
60scanf("%lU", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
61scanf("%hO", x); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
62scanf("%lO", y); // expected-warning{{conversion specifier is not supported by ISO C}} expected-no… in testScanf()
Dformat-strings-enum.c14 EXTERN_C int scanf(const char *, ...);
47scanf("%c", fwd); // expected-warning{{format specifies type 'char *' but the argument has type 'e… in forward_enum()
48 scanf("%u", fwd); in forward_enum()
49scanf("%lu", fwd); // expected-warning{{format specifies type 'unsigned long *' but the argument h… in forward_enum()
50scanf("%p", fwd); // expected-warning{{format specifies type 'void **' but the argument has type '… in forward_enum()
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/
Dcert-err34-c.c12 extern int scanf(const char * restrict format, ...);
40 scanf("%jd", &im); in f1()
57 scanf("%hhd", &c); in f1()
59 scanf("%hd", &s); in f1()
61 scanf("%zu", &st); in f1()
63 scanf("%td", &pt); in f1()
65 scanf("%o", ui); in f1()
67 scanf("%X", ui); in f1()
69 scanf("%x", ui); in f1()
91 scanf("%d%u%f", &i, &u, &f); in f3()
[all …]
/external/clang/test/Analysis/
Dtaint-generic.c3 int scanf(const char *restrict format, ...);
38 scanf("%d", &n); in bufferScanfDirect()
44 scanf("%d", &n); in bufferScanfArithmetic1()
51 scanf("%d", &n); in bufferScanfArithmetic2()
58 scanf("%d", &n); in bufferScanfAssignment()
68scanf("%d", t); // expected-warning {{format specifies type 'int *' but the argument has type 'int… in scanfArg()
113 scanf("%s", addr); in testTaintSystemCall()
125 scanf("%s", addr); in testTaintSystemCall2()
134 scanf("%s %d", addr, &numt); in testTaintSystemCall3()
141 scanf("%zd", &ts); in testTaintedBufferSize()
[all …]
Dtaint-tester.c17 scanf("%d", &n); in taintTracking()
31 scanf("%p", &ptr); in taintTracking()
43 scanf("%p", &xyPtr); in taintTracking()
51 scanf("%d", &xy.y); in taintTracking()
52 scanf("%d", &xy.x); in taintTracking()
57 scanf("%d %d", &xy.y, &xy.x); in taintTracking()
66 scanf("%d", &x); in BitwiseOp()
180 scanf("%s", s); in atoiTest()
/external/llvm-project/clang/test/Analysis/
Dtaint-generic.c48 int scanf(const char *restrict format, ...);
91 scanf("%d", &n); in bufferScanfDirect()
97 scanf("%d", &n); in bufferScanfArithmetic1()
104 scanf("%d", &n); in bufferScanfArithmetic2()
111 scanf("%d", &n); in bufferScanfAssignment()
121scanf("%d", t); // expected-warning {{format specifies type 'int *' but the argument has type 'int… in scanfArg()
166 scanf("%s", addr); in testTaintSystemCall()
178 scanf("%s", addr); in testTaintSystemCall2()
187 scanf("%s %d", addr, &numt); in testTaintSystemCall3()
200 scanf("%zd", &ts); in testTaintedBufferSize()
[all …]
Dtaint-diagnostic-visitor.c5 int scanf(const char *restrict format, ...);
11 scanf("%s", buf); // expected-note {{Taint originated here}} in taintDiagnostic()
18 scanf("%d", &index); // expected-note {{Taint originated here}} in taintDiagnosticOutOfBound()
24 scanf("%d", &operand); // expected-note {{Value assigned to 'operand'}} in taintDiagnosticDivZero()
32 scanf("%d", &x); // expected-note {{Value assigned to 'x'}} in taintDiagnosticVLA()
Dtaint-generic.cpp6 int scanf(const char*, ...);
16 void scanf(const char*, ...);
39 myNamespace::scanf("%d", &x); in testConfigurationNamespacePropagation1()
42 scanf("%d", &x); in testConfigurationNamespacePropagation1()
114 void scanf(const char*, int*);
121 foo.scanf("%d", &x); in testConfigurationMemberFunc()
Dtaint-tester.c17 scanf("%d", &n); in taintTracking()
31 scanf("%p", &ptr); in taintTracking()
43 scanf("%p", &xyPtr); in taintTracking()
51 scanf("%d", &xy.y); in taintTracking()
52 scanf("%d", &xy.x); in taintTracking()
57 scanf("%d %d", &xy.y, &xy.x); in taintTracking()
66 scanf("%d", &x); in BitwiseOp()
180 scanf("%s", s); in atoiTest()
/external/clang/test/SemaCXX/
Dformat-strings-0x.cpp4 extern int scanf(const char *restrict, ...);
9scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type '… in f()
12scanf("%p", sp); // expected-warning{{format specifies type 'void **' but the argument has type '… in f()
15 scanf("%afoobar", fp); in f()
/external/llvm-project/clang/test/SemaCXX/
Dformat-strings-0x.cpp4 extern int scanf(const char *restrict, ...);
9scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type '… in f()
12scanf("%p", sp); // expected-warning{{format specifies type 'void **' but the argument has type '… in f()
15 scanf("%afoobar", fp); in f()
Dformat-strings.cpp8 extern int scanf(const char *restrict, ...);
14 scanf("%as", sp); in f()
22 scanf("%afoobar", fp); in f()
34 int scanf(const char *, ...) __attribute__((format(scanf, 2, 3)));
44 foo.scanf("%d"); // expected-warning{{more '%' conversions than data arguments}} in h()

123456