This commit is contained in:
Geoffrey White 2019-05-29 15:37:50 +01:00
Родитель 52b68a77bd
Коммит 536adaae7f
3 изменённых файлов: 47 добавлений и 0 удалений

Просмотреть файл

@ -18,3 +18,7 @@
| test.cpp:374:2:376:17 | do (...) ... | test.cpp:376:11:376:15 | 0 | | do (...) ... | { ... } | { ... } | return ... |
| test.cpp:384:2:386:2 | while (...) ... | test.cpp:384:9:384:12 | 1 | 1 | 1 | { ... } | | return ... |
| test.cpp:394:2:396:2 | while (...) ... | test.cpp:394:9:394:21 | ... , ... | | { ... } | { ... } | | |
| test.cpp:404:3:408:3 | while (...) ... | test.cpp:404:10:404:13 | loop | 1 | loop | { ... } | | |
| test.cpp:416:2:418:2 | for(...;...;...) ... | test.cpp:416:18:416:23 | ... < ... | 1 | i | { ... } | i | return ... |
| test.cpp:424:2:425:2 | for(...;...;...) ... | test.cpp:424:18:424:23 | ... < ... | 1 | i | { ... } | i | return ... |
| test.cpp:433:2:434:2 | for(...;...;...) ... | test.cpp:433:18:433:22 | 0 | 0 | | { ... } | 0 | return ... |

Просмотреть файл

@ -12,3 +12,6 @@
| test.cpp:336:10:336:10 | a | The variable $@ may not be initialized here. | test.cpp:333:7:333:7 | a | a |
| test.cpp:369:10:369:10 | a | The variable $@ may not be initialized here. | test.cpp:358:7:358:7 | a | a |
| test.cpp:378:9:378:11 | val | The variable $@ may not be initialized here. | test.cpp:359:6:359:8 | val | val |
| test.cpp:410:9:410:11 | val | The variable $@ may not be initialized here. | test.cpp:401:6:401:8 | val | val |
| test.cpp:417:10:417:10 | j | The variable $@ may not be initialized here. | test.cpp:414:9:414:9 | j | j |
| test.cpp:436:9:436:9 | j | The variable $@ may not be initialized here. | test.cpp:431:9:431:9 | j | j |

Просмотреть файл

@ -395,3 +395,43 @@ int test33() {
return val; // GOOD
}
}
int test34() {
bool loop = true;
int val;
{
while (loop)
{
val = 1;
loop = false;
}
}
return val; // GOOD [FALSE POSITIVE]
}
int test35() {
int i, j;
for (int i = 0; i < 10; i++, j = 1) {
return j; // BAD
}
}
int test36() {
int i, j;
for (int i = 0; i < 10; i++, j = 1) {
}
return j; // GOOD
}
int test38() {
int i, j;
for (int i = 0; false; i++, j = 1) {
}
return j; // BAD
}