Home | History | Annotate | Download | only in Analysis

Lines Matching full:warning

3 /* Only one expected warning per function allowed at the very end. */
24 return (5.14F != 5.14F); // no warning
28 return (6.14F != 7.14F); // no warning
34 return (f != g); // no warning
39 return (f != f); // no warning
44 return (f != 7.1F); // no warning
49 return (7.1F != f); // no warning
55 return (t != f); // no warning
61 return (f != t); // no warning
68 return ((int)f != (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
72 return ((char)f != (int)f); // no warning
77 res = (f + 3.14F != f + 3.14F); // no warning
83 return (f + 3.14F != g + 3.14F); // no warning
88 res = ((int)f + 3.14F != (int)f + 3.14F); // no warning
94 res = ((int)f + 3.14F != (char)f + 3.14F); // no warning
103 res = (((int)f + (3.14F - u)*t) != ((int)f + (3.14F - u)*t)); // no warning
112 res = (((int)f + (u - 3.14F)*t) != ((int)f + (3.14F - u)*t)); // no warning
121 res = (((int)f + (u - 3.14F)*t) != ((int)f + (3.14F - u)*(f + t != f + t))); // no warning
133 return (5 != 5); // expected-warning {{comparison of identical expressions always evaluates to false}}
137 return (6 != 7); // no warning
143 return (f != g); // no warning
148 return (f != 7); // no warning
153 return (7 != f); // no warning
158 return ((int)f != (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
162 return ((char)f != (int)f); // no warning
169 res = (f + 4 != f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}}
175 return (f + 4 != g + 4); // no warning
184 res = ((int)f + 4 != (int)f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}}
192 res = ((int)f + 4 != (char)f + 4); // no warning
199 res = (u + t != u + t); // expected-warning {{comparison of identical expressions always evaluates to false}}
208 res = (((int)f + (3 - u)*t) != ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}}
217 res = (((int)f + (u - 3)*t) != ((int)f + (3 - u)*t)); // no warning
226 res = (((int)f + (u - 3)*t) != ((int)f + (3 - u)*(t + 1 != t + 1))); // expected-warning {{comparison of identical expressions always evaluates to false}}
238 return (p != 0); // no warning
242 return (6 != 7); // no warning
249 return (f != g); // no warning
255 return ((int*)f != (int*)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
260 return ((int*)((char*)f) != (int*)f); // no warning
266 res = (f + 4 != f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}}
273 return (f + 4 != g + 4); // no warning
281 res = ((int*)f + 4 != (int*)f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}}
288 res = ((int*)f + 4 != (int*)((char*)f) + 4); // no warning
298 res = ((f + (3)*t) != (f + (3)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}}
308 res = (((3)*t + f) != (f + (3)*t)); // no warning
318 int res = (a+func() != a+func()); // no warning
325 int res = (a+func() != a+func2()); // no warning
332 int res = (a+funcParam(a) != a+funcParam(a)); // no warning
339 int res = (a+funcParam(a) != a+funcParam(b)); // no warning
355 return (f == g); // no warning
361 return (f+1 == f+1); // expected-warning {{comparison of identical expressions always evaluates to true}}
367 return (5.14F == 5.14F); // no warning
371 return (6.14F == 7.14F); // no warning
377 return (f == g); // no warning
382 return (f == f); // no warning
388 return (f == 7.1F); // no warning
393 return (7.1F == f); // no warning
399 return (t == f); // no warning
405 return (f == t); // no warning
413 return ((int)f == (int)f); // expected-warning {{comparison of identical expressions always evaluates to true}}
417 return ((char)f == (int)f); // no warning
422 res = (f + 3.14F == f + 3.14F); // no warning
428 return (f + 3.14F == g + 3.14F); // no warning
433 res = ((int)f + 3.14F == (int)f + 3.14F); // no warning
439 res = ((int)f + 3.14F == (char)f + 3.14F); // no warning
448 res = (((int)f + (3.14F - u)*t) == ((int)f + (3.14F - u)*t)); // no warning
457 res = (((int)f + (u - 3.14F)*t) == ((int)f + (3.14F - u)*t)); // no warning
466 res = (((int)f + (u - 3.14F)*t) == ((int)f + (3.14F - u)*(f + t == f + t))); // no warning
477 return (5 == 5); // expected-warning {{comparison of identical expressions always evaluates to true}}
481 return (6 == 7); // no warning
487 return (f == g); // no warning
492 return ((int)f == (int)f); // expected-warning {{comparison of identical expressions always evaluates to true}}
496 return ((char)f == (int)f); // no warning
501 return (f == 7); // no warning
506 return (7 == f); // no warning
514 res = (f + 4 == f + 4); // expected-warning {{comparison of identical expressions always evaluates to true}}
520 return (f + 4 == g + 4); // no warning
529 res = ((int)f + 4 == (int)f + 4); // expected-warning {{comparison of identical expressions always evaluates to true}}
538 res = ((int)f + 4 == (char)f + 4); // no warning
545 res = (u + t == u + t); // expected-warning {{comparison of identical expressions always evaluates to true}}
554 res = (((int)f + (3 - u)*t) == ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to true}}
563 res = (((int)f + (u - 3)*t) == ((int)f + (3 - u)*t)); // no warning
572 res = (((int)f + (u - 3)*t) == ((int)f + (3 - u)*(t + 1 == t + 1))); // expected-warning {{comparison of identical expressions always evaluates to true}}
581 int res = (a+func() == a+func()); // no warning
588 int res = (a+func() == a+func2()); // no warning
595 int res = (a+funcParam(a) == a+funcParam(a)); // no warning
602 int res = (a+funcParam(a) == a+funcParam(b)); // no warning
618 return (5.14F < 5.14F); // expected-warning {{comparison of identical expressions always evaluates to false}}
622 return (6.14F < 7.14F); // no warning
628 return (f < g); // no warning
633 return (f < f); // expected-warning {{comparison of identical expressions always evaluates to false}}
638 return (f < 7.1F); // no warning
643 return (7.1F < f); // no warning
649 return (t < f); // no warning
655 return (f < t); // no warning
661 return ((int)f < (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
665 return ((char)f < (int)f); // no warning
670 res = (f + 3.14F < f + 3.14F); // no warning
676 return (f + 3.14F < g + 3.14F); // no warning
681 res = ((int)f + 3.14F < (int)f + 3.14F); // no warning
687 res = ((int)f + 3.14F < (char)f + 3.14F); // no warning
696 res = (((int)f + (3.14F - u)*t) < ((int)f + (3.14F - u)*t)); // no warning
705 res = (((int)f + (u - 3.14F)*t) < ((int)f + (3.14F - u)*t)); // no warning
714 res = (((int)f + (u - 3.14F)*t) < ((int)f + (3.14F - u)*(f + t < f + t))); // no warning
724 return (5 < 5); // expected-warning {{comparison of identical expressions always evaluates to false}}
728 return (6 < 7); // no warning
734 return (f < g); // no warning
739 return (f < 7); // no warning
744 return (7 < f); // no warning
750 return (t < f); // no warning
756 return (f < t); // no warning
761 return ((int)f < (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
765 return ((char)f < (int)f); // no warning
770 res = (f + 3 < f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}}
776 return (f + 3 < g + 3); // no warning
781 res = ((int)f + 3 < (int)f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}}
787 res = ((int)f + 3 < (char)f + 3); // no warning
796 res = (((int)f + (3 - u)*t) < ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}}
805 res = (((int)f + (u - 3)*t) < ((int)f + (3 - u)*t)); // no warning
814 res = (((int)f + (u - 3)*t) < ((int)f + (3 - u)*(t + u < t + u))); // expected-warning {{comparison of identical expressions always evaluates to false}}
828 return (5.14F > 5.14F); // expected-warning {{comparison of identical expressions always evaluates to false}}
832 return (6.14F > 7.14F); // no warning
839 return (f > g); // no warning
844 return (f > f); // expected-warning {{comparison of identical expressions always evaluates to false}}
850 return (f > 7.1F); // no warning
855 return (7.1F > f); // no warning
861 return (t > f); // no warning
867 return (f > t); // no warning
872 return ((int)f > (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
876 return ((char)f > (int)f); // no warning
881 res = (f + 3.14F > f + 3.14F); // no warning
887 return (f + 3.14F > g + 3.14F); // no warning
892 res = ((int)f + 3.14F > (int)f + 3.14F); // no warning
898 res = ((int)f + 3.14F > (char)f + 3.14F); // no warning
907 res = (((int)f + (3.14F - u)*t) > ((int)f + (3.14F - u)*t)); // no warning
916 res = (((int)f + (u - 3.14F)*t) > ((int)f + (3.14F - u)*t)); // no warning
925 res = (((int)f + (u - 3.14F)*t) > ((int)f + (3.14F - u)*(f + t > f + t))); // no warning
935 return (5 > 5); // expected-warning {{comparison of identical expressions always evaluates to false}}
939 return (6 > 7); // no warning
946 return (f > g); // no warning
951 return (f > 7); // no warning
956 return (7 > f); // no warning
961 return ((int)f > (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}}
965 return ((char)f > (int)f); // no warning
970 res = (f + 3 > f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}}
976 return (f + 3 > g + 3); // no warning
981 res = ((int)f + 3 > (int)f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}}
987 res = ((int)f + 3 > (char)f + 3); // no warning
996 res = (((int)f + (3 - u)*t) > ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}}
1005 res = (((int)f + (u - 3)*t) > ((int)f + (3 - u)*t)); // no warning
1014 res = (((int)f + (u - 3)*t) > ((int)f + (3 - u)*(t + u > t + u))); // expected-warning {{comparison of identical expressions always evaluates to false}}
1027 a = a > 5 ? b : b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1033 a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1037 a = a > 0 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1043 a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1048 return a > 5 ? "abc" : "abc"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1054 a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1060 a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1065 a = a > 0 ? a&&b : a&&b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1071 a = a > 5 ? a+b : b+a; // no warning
1077 a = a > 5 ? b+a : a+b; // no warning
1082 a = a > 0 ? a&&b : b&&a; // no warning
1088 a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1094 a = a > 5 ? a+func() : a+func(); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1100 a = a > 5 ? a+func() : a+func2(); // no warning
1106 a = a > 5 ? a+funcParam(b) : a+funcParam(b); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1112 a = a > 5 ? a+funcParam(a) : a+funcParam(b); // no warning
1118 a = a > 5 ? a++ : a++; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1124 a = a > 5 ? a++ : b++; // no warning
1130 a = a > 5 ? a=1 : a=1; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1136 a = a > 5 ? a=1 : a=2; // no warning
1143 a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(c+a)); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1150 a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(a+c)); // no warning
1157 a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 2 : 4); // no warning
1164 a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 4 : 4); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1169 if (b) { // expected-warning {{true and false branches are identical}}
1178 if (b) { // expected-warning {{true and false branches are identical}}
1186 if (b) { // no warning
1195 if (b) { // expected-warning {{true and false branches are identical}}
1202 if (b) // expected-warning {{true and false branches are identical}}
1211 if (b) // expected-warning {{true and false branches are identical}}
1219 if (b) // expected-warning {{true and false branches are identical}}
1226 if (b) // no-warning
1234 if (b) // no-warning
1242 if (b) // expected-warning {{true and false branches are identical}}
1250 if (b) { // expected-warning {{true and false branches are identical}}
1260 if (b) { // expected-warning {{true and false branches are identical}}
1270 if (b) { // expected-warning {{true and false branches are identical}}
1281 if (b) { // expected-warning {{true and false branches are identical}}
1292 if (b) { // no-warning
1303 if (b) { // expected-warning {{true and false branches are identical}}
1315 if (b) { // expected-warning {{true and false branches are identical}}
1325 int a = 5 | 5; // expected-warning {{identical expressions on both sides of bitwise operator}}
1330 int b = a | a; // expected-warning {{identical expressions on both sides of bitwise operator}}
1335 int b = (a | a); // expected-warning {{identical expressions on both sides of bitwise operator}}
1340 int b = a | 4; // no-warning
1346 int c = a | b; // no-warning
1351 int b = a | 4 | a; // expected-warning {{identical expressions on both sides of bitwise operator}}
1356 int b = func() | func(); // no-warning
1360 if (a == 4 && a == 4) // expected-warning {{identical expressions on both sides of logical operator}}
1365 if (a == 4 || a == 5 || a == 4) // expected-warning {{identical expressions on both sides of logical operator}}
1370 if (a == 4 || a == 5 || a == 6) // no-warning
1375 if (a == func() || a == func()) // no-warning
1382 if (x == 4 && y == 5 || x == 4 && y == 6) // no-warning
1387 if (x == 4 && y == 5 || x == 4 && y == 5) // expected-warning {{identical expressions on both sides of logical operator}}
1413 else if (x == 1) // expected-warning {{expression is identical to previous condition}}
1420 else if (x == 1) // expected-warning {{expression is identical to previous condition}}
1422 else if (x == 1) // expected-warning {{expression is identical to previous condition}}
1431 else if (x == 1) // expected-warning {{expression is identical to previous condition}}
1440 else if (x == 1) // expected-warning {{expression is identical to previous condition}}
1447 else if (x & 1) // expected-warning {{expression is identical to previous condition}}
1456 else if (x == 2) // expected-warning {{expression is identical to previous condition}}
1469 else if (x == 2) // expected-warning {{expression is identical to previous condition}}
1482 else if (x == 2) // expected-warning {{expression is identical to previous condition}}
1486 else if (x == 3) // expected-warning {{expression is identical to previous condition}}
1495 else if (func()) // no-warning
1504 else if (func()) // no-warning
1511 else if (x++) // no-warning
1516 const wchar_t * a = 0 ? L"Warning" : L"Warning"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
1519 const wchar_t * a = 0 ? L"No" : L"Warning";
1528 } else { // no-warning
1538 if (x == 1) // expected-warning {{conditions of the inner and outer statements are identical}}
1542 // FIXME: Should warn here. The warning is currently not emitted because there