Fixed warnings for 'pedantic' option.

I use rather strict warnings policy, so I fixed some code issues when compiling with 'pedantic' warnings turned on.