fix warnings + errors with clang regarding return types and declarations