Clang 3.0: Fixed warnings at high warning levels.

Flags used: -Wall -Wextra -Weverything -pedantic -Werror
-Wno-exit-time-destructors -Wno-global-constructors -Wno-padded -Wno-weak-vtables