Log Message: Under C++11 it is invalid to implicitly cast from a larger type to a smaller type in an initializer. Adjust various places accordingly. Avoid set-but-not-used warnings in some other places for newer GCC.