Skip to content

Commit

Permalink
Initialize LasWriter::m_forwardVlrs (#1948)
Browse files Browse the repository at this point in the history
Fixes the following Valgrind warning on FerryFilterTest

==17720== Conditional jump or move depends on uninitialised value(s)
==17720==    at 0x56E9B3A: pdal::LasWriter::addForwardVlrs() (LasWriter.cpp:441)
==17720==    by 0x56E85B2: pdal::LasWriter::readyTable(pdal::BasePointTable&) (LasWriter.cpp:307)
==17720==    by 0x56A727B: pdal::FlexWriter::ready(pdal::BasePointTable&) (FlexWriter.hpp:89)
==17720==    by 0x577046F: pdal::Stage::execute(pdal::BasePointTable&) (Stage.cpp:209)
==17720==    by 0x5782430: pdal::PipelineManager::execute() (PipelineManager.cpp:207)
==17720==    by 0x457957: FerryFilterTest_test_ferry_copy_json_Test::TestBody() (FerryFilterTest.cpp:104)
==17720==    by 0x493CE7: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2078)
==17720==    by 0x48EC8A: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2114)
==17720==    by 0x4744B3: testing::Test::Run() (gtest.cc:2151)
==17720==    by 0x474D5B: testing::TestInfo::Run() (gtest.cc:2326)
==17720==    by 0x47544A: testing::TestCase::Run() (gtest.cc:2444)
==17720==    by 0x47C527: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4315)
==17720==
  • Loading branch information
rouault authored and abellgithub committed Apr 21, 2018
1 parent b6474df commit e7ed147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/LasWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class PDAL_DLL LasWriter : public FlexWriter, public Streamable
std::string m_curFilename;
StringList m_forwardSpec;
std::set<std::string> m_forwards;
bool m_forwardVlrs;
bool m_forwardVlrs = false;
LasCompression m_compression;
std::vector<char> m_pointBuf;
SpatialReference m_aSrs;
Expand Down

0 comments on commit e7ed147

Please sign in to comment.