Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
From f0f3d43a977fb267c671830a88de31fa7cb238ce Mon Sep 17 00:00:00 2001
From: Doug Ihde <dihde@fb.com>
Date: Tue, 11 May 2010 23:22:39 +0000
Subject: [PATCH 9/9] fix uninitialized enum values in thrift C++ objects
Summary:
The thrift-generated code for C++ class objects does not provide any
initialization for enum values, so they wind up containing random/uninitialized
data. This causes problems when clients do not send argument data, as the server
receives random data rather than zero for unpassed args.
Enums should be initialized to zero.
Test Plan:
Made a test thrift file to make sure generated code is as expected.
Revert Plan:
OK
—
compiler/cpp/src/generate/t_cpp_generator.cc | 2 +-
1 files changed, 1 insertions, 1 deletions