enable -pedantic warnings and fix them
fix some clang warnings to clarify the code
fix more clang warnings