5 Replies Latest reply on Dec 5, 2013 4:31 AM by kenny.millar

    Unexpected warning: array subscript has type 'char' [-Wchar-subscripts]

    kenny.millar

       The following piece of code give the error:

         

      .\usb_uart.c:210:3: warning: array subscript has type 'char' [-Wchar-subscripts] at the line marked with "****", but as far as I can see the array subscript is int, not char.

         

       

         

       

         
       int i,len;  uint16 c,d;  uint32 ip,u32;  char r,s;  char *pC = 0;  //MSG_BUF *pMB;     // convert entire buffer to UCASE  for(i=0; i<usbRxPos; i++)  {  usbCmdBuffer[i] = toupper(usbCmdBuffer[i]); // ****  }