fix dead loop under arm CPU(char is unsigned under some arm gcc)

getopt returns signed int, and that int is converted to char. But under some arm compiler, the char is unsigned. 
When char is signed:
  getopt returns '-1', char 'c' gets '-1'. Because char 'c' is signed. so char 'c' is extended to int(still -1) to compare with '-1'.
When char is unsigned:
  getopt returns '-1', char 'c' gets '0xffffffff", then '0xffffffff' is cut to '0xffff'. so char 'c' is '0xffff'. Then char 'c' is extended to int(0x0000ffff) to compare with '-1'(0xffffffff). But '0x0000ffff' is not equal to '0xffffffff'. Then dead loop appears.

Sample code:

  1 #include <stdio.h>
  2 int main()
  3 {
  4     signed char b = -1;
  5     unsigned char c = -1;
  6     printf("b is %x, c is %x, -1 is %x\r\n", (int)b, (int)c, -1);
  7 }


Output:
b is ffffffff, c is ff, -1 is ffffffff