Fixed build warning with gcc 4.7.3

  [Problem] build warning with gcc 4.7.3
            warning: cast from ‘void*’ to ‘int’ loses precision [-fpermissive]