Fix from clang compiler warnings: Include header files to avoid implicit declaration.
Fix from clang compiler warnings: Include header files to avoid implicit declaration, use explicit parentheses, use explicit cast for assignment.
Fix from clang compiler warnings: Use explicit parentheses.