Fix gcc type mismatch error.

I got compile error with gcc-4.5.2, this patch fixes this.