mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
28 lines
691 B
Java
28 lines
691 B
Java
import java.util.*;
|
|
|
|
public class WidenMulInLoop {
|
|
void test1() {
|
|
for (int i = 0; <warning descr="Condition 'i < Integer.MAX_VALUE' is always 'true'">i < Integer.MAX_VALUE</warning>; <warning descr="Variable update does nothing">i</warning> *= 3) {
|
|
System.out.println(i);
|
|
}
|
|
}
|
|
|
|
void test2() {
|
|
for (int i = 1; <warning descr="Condition 'i < Integer.MAX_VALUE' is always 'true'">i < Integer.MAX_VALUE</warning>; i *= 2) {
|
|
System.out.println(i);
|
|
}
|
|
}
|
|
|
|
void test3() {
|
|
for (int i = 1; i < Integer.MAX_VALUE; i *= 3) {
|
|
System.out.println(i);
|
|
}
|
|
}
|
|
|
|
void test4(int b, int c) {
|
|
for (int i = 1; i < 100; i++) {
|
|
b = i * b / c;
|
|
}
|
|
}
|
|
}
|