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

Patch: John Campbell