Fixed compiler warnings except for warning produced by CFLAGS "-Wdeclaration-after-statement" and "-Wmissing-declarations".