Eliminate clang warnings

The clang compiler is quite strict in its warnings and errors. This
commit eliminates all clang warnings; most were about implicit type
conversion and uninitialized variables.