fixed most of warnings generated by compiler-option -pedantic, except bit-field warnings