C method gives warning: expression result unused and freezes : <p>I have small problem with my home task. I have to create a method that sums an array, but with specific, given step. I did something like this: </p>

<pre><code>int sum_step(int t[], int size, int step)
{
   int i;
   int sum = 0;

   for(i=0; i &lt; size; i+step)
   {
      sum += t[i];
   }

   return sum;
}
</code></pre>

<p>and console returns warning:</p>

<pre><code>warning: expression result unused
  [-Wunused-value]
  i + step;
  ~ ^ ~~~~
</code></pre>

<p>Someone knows what is wrong? Thank in advance!</p>
