vmware-archive / quickstep

Quickstep Project
Apache License 2.0
27 stars 13 forks source link

Fixes a g++ compiler warning #221

Closed cramja closed 8 years ago

cramja commented 8 years ago

Fixes a compiler warning for g++ 4.9.2:

Scanning dependencies of target quickstep_queryoptimizer_ExecutionGenerator
[100%] Building CXX object query_optimizer/CMakeFiles/quickstep_queryoptimizer_ExecutionGenerator.dir/ExecutionGenerator.cpp.o
In file included from /home/spehlmann/qs/query_optimizer/ExecutionGenerator.hpp:36:0,
                 from /home/spehlmann/qs/query_optimizer/ExecutionGenerator.cpp:20:
/home/spehlmann/qs/query_optimizer/ExecutionHeuristics.hpp: In member function ‘void quickstep::optimizer::ExecutionGenerator::convertHashJoin(const HashJoinPtr&)’:
/home/spehlmann/qs/query_optimizer/ExecutionHeuristics.hpp:63:10: error: ‘referenced_stored_build_relation’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   struct HashJoinInfo {
          ^
/home/spehlmann/qs/query_optimizer/ExecutionGenerator.cpp:592:26: note: ‘referenced_stored_build_relation’ was declared here
   const CatalogRelation *referenced_stored_build_relation;
                          ^
cc1plus: all warnings being treated as errors

by initializing the pointers.

zuyu commented 8 years ago

LGTM!