Fixed GCC/Clang warnings (take 2!)

Fixed all GCC/Clang warnings under -Wall, with the exception of converting const char* to char*, some comments within comments/multiline comment warnings, and also offsetof warning in GCC.