Fixed build warning with gcc 4.7.3

  [Problem] build warning with gcc 4.7.3
            warning: compare between int and unsigned