title: In a C program, getting warning: "Statement with no effect"
body: <p>When I am trying to compile a particular program with <code>-Wall</code>, GCC is showing the warning as:</p>
  
  <pre><code>expcal.c:66:5: warning: statement with no effect [-Wunused-value]
  </code></pre>
  
  <p>this warning is referring the line:</p>
  
  <pre><code>ed.operator[j] == str[i];
  </code></pre>
  
  <p>which is found in the following loop:</p>
  
  <pre><code>for(i=0;i&lt;strlen(str);i++)
          {
                  j=0;
                  if(str[i] == '+' || str[i] == '-' || str[i] == '*')
                  {
                          if(str[i+1] == '+' || str[i+1] == '-' || str[i+1] == '*')
                                  return 0;
                          else
                          {
                                  //j=0;
                                  ed.operator[j] == str[i];
                                  count++;
                                  j++;
                          }
                  }
          }
  </code></pre>
  
  <p>I know that this warning will arise when there's something wrong with an assignment statement. What is wrong in the above code that would cause GCC to generate such a warning?</p>