title: Array subscript has type ‘char’ [-Wchar-subscripts]
body: <p>I am trying to remove leading/trailing whitespace characters with help below helper function. 
  When compiling i am getting warning: array subscript has type ‘char’ [-Wchar-subscripts] 
  how to get rid of this message. </p>
  
  <pre><code>  char *removeSpace(char *str )
    {
       char *end;
  
       // Trim leading space
       while(isspace(*str)) 
       str++;
  
      if(*str == 0)  // All spaces?
      return str;
  
     // Trim trailing space
     end = str + strlen(str) - 1;
     while(end &gt; str &amp;&amp; isspace(*end)) end--;
  
     // Write new null terminator
     *(end+1) = 0;
  
     return str;
   }
  </code></pre>