THRIFT-2784 Eliminate compiler warnings in generated C++ code

Patch: Roger Meier