Reports the cases where a variable is redundant as its value is never used after its assignment.
If the variable is unused, it's better to remove it to shorten the code and to avoid redundant allocations.

So the following cases are reported:

Use the first checkbox below to have this inspection report about redundant initializers:

  int getI() {
    int i = 0; // redundant initialization
    i = 2;
    return i;
  }

Use the second checkbox below to have this inspection report about the cases when ++i expression may be replaced with i + 1 one:

  int preInc(int i) {
    int res = i;
    return ++res;
  }

Use the third checkbox below to have this inspection report about the cases when the result of i++ expression is not used later:

  int postInc(int i) {
    int res = i;
    return res++;
  }