[Liblas-commits] hg-main-tree: gcc 4.5.2 linker issue
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Aug 15 10:15:22 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/8522c2999b57
changeset: 1087:8522c2999b57
user: mpg
date: Mon Aug 15 06:43:50 2011 -0700
description:
gcc 4.5.2 linker issue
Subject: hg-main-tree: gcc lint
details: http://hg.libpc.orghg-main-tree/rev/796b179c92df
changeset: 1088:796b179c92df
user: mpg
date: Mon Aug 15 07:12:43 2011 -0700
description:
gcc lint
diffstat:
include/pdal/drivers/las/VariableLengthRecord.hpp | 2 +-
src/drivers/las/LasHeaderReader.cpp | 4 ++--
src/drivers/las/VariableLengthRecord.cpp | 1 +
test/unit/ByteSwapFilterTest.cpp | 4 ++++
test/unit/ChipperTest.cpp | 4 ++++
test/unit/FauxReaderTest.cpp | 5 +++++
test/unit/QFITReaderTest.cpp | 4 ++++
test/unit/ReprojectionFilterTest.cpp | 3 ++-
test/unit/ScalingFilterTest.cpp | 4 ++++
test/unit/Support.cpp | 7 +++++++
test/unit/TerraSolidTest.cpp | 5 +++++
11 files changed, 39 insertions(+), 4 deletions(-)
diffs (175 lines):
diff -r 91c4509b5ec5 -r 796b179c92df include/pdal/drivers/las/VariableLengthRecord.hpp
--- a/include/pdal/drivers/las/VariableLengthRecord.hpp Sun Aug 14 22:06:34 2011 -0500
+++ b/include/pdal/drivers/las/VariableLengthRecord.hpp Mon Aug 15 07:12:43 2011 -0700
@@ -82,7 +82,7 @@
std::size_t getLength() const;
std::size_t getTotalSize() const;
- static const int s_headerLength = 54;
+ static const int s_headerLength;
static void setSRSFromVLRs(const std::vector<VariableLengthRecord>& vlrs, SpatialReference& srs);
static void setVLRsFromSRS(const SpatialReference& srs, std::vector<VariableLengthRecord>& vlrs, SpatialReference::WKTModeFlag modeFlag);
diff -r 91c4509b5ec5 -r 796b179c92df src/drivers/las/LasHeaderReader.cpp
--- a/src/drivers/las/LasHeaderReader.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/src/drivers/las/LasHeaderReader.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -342,9 +342,9 @@
std::string description = "";
{
- boost::uint8_t buf1[pdal::drivers::las::VariableLengthRecord::s_headerLength];
+ boost::scoped_ptr<boost::uint8_t> buf1( new boost::uint8_t[pdal::drivers::las::VariableLengthRecord::s_headerLength]);
Utils::read_n(buf1, m_istream, pdal::drivers::las::VariableLengthRecord::s_headerLength);
- boost::uint8_t* p1 = buf1;
+ boost::uint8_t* p1 = buf1.get();
reserved = Utils::read_field<boost::uint16_t>(p1);
boost::ignore_unused_variable_warning(reserved);
diff -r 91c4509b5ec5 -r 796b179c92df src/drivers/las/VariableLengthRecord.cpp
--- a/src/drivers/las/VariableLengthRecord.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/src/drivers/las/VariableLengthRecord.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -55,6 +55,7 @@
static const boost::uint16_t s_wktRecordId = 2112;
static const std::string s_wktDescription = "OGR variant of OpenGIS WKT SRS";
+const int VariableLengthRecord::s_headerLength = 54;
VariableLengthRecord::VariableLengthRecord(boost::uint16_t reserved,
std::string userId,
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/ByteSwapFilterTest.cpp
--- a/test/unit/ByteSwapFilterTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/ByteSwapFilterTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -45,6 +45,10 @@
#include <pdal/Endian.hpp>
#include <iostream>
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#endif
+
using namespace pdal;
BOOST_AUTO_TEST_SUITE(ByteSwapFilterTest)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/ChipperTest.cpp
--- a/test/unit/ChipperTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/ChipperTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -42,6 +42,10 @@
#include "Support.hpp"
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#endif
+
using namespace pdal;
BOOST_AUTO_TEST_SUITE(ChipperTest)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/FauxReaderTest.cpp
--- a/test/unit/FauxReaderTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/FauxReaderTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -42,6 +42,11 @@
#include <iostream>
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#endif
+
using namespace pdal;
BOOST_AUTO_TEST_SUITE(FauxReaderTest)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/QFITReaderTest.cpp
--- a/test/unit/QFITReaderTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/QFITReaderTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -45,6 +45,10 @@
#include <iostream>
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#endif
+
using namespace pdal;
BOOST_AUTO_TEST_SUITE(QfitReaderTest)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/ReprojectionFilterTest.cpp
--- a/test/unit/ReprojectionFilterTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/ReprojectionFilterTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -49,6 +49,8 @@
BOOST_AUTO_TEST_SUITE(ReprojectionFilterTest)
+#ifdef PDAL_SRS_ENABLED
+
static void getPoint(const pdal::PointBuffer& data, double& x, double& y, double& z, double scaleX, double scaleY, double scaleZ)
{
using namespace pdal;
@@ -70,7 +72,6 @@
return;
}
-#ifdef PDAL_SRS_ENABLED
// Test reprojecting UTM 15 to DD with a filter
BOOST_AUTO_TEST_CASE(ReprojectionFilterTest_test_1)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/ScalingFilterTest.cpp
--- a/test/unit/ScalingFilterTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/ScalingFilterTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -46,6 +46,10 @@
#include "Support.hpp"
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#endif
+
BOOST_AUTO_TEST_SUITE(ScalingFilterTest)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/Support.cpp
--- a/test/unit/Support.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/Support.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -51,6 +51,11 @@
#include <pdal/exceptions.hpp>
#include "TestConfig.hpp"
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+//#pragma GCC diagnostic ignored "-Wsign-compare"
+#endif
+
std::string Support::datapath()
{
@@ -416,6 +421,7 @@
}
+#ifdef PDAL_COMPILER_MSVC
// http://www.codepedia.com/1/CppStringReplace
static std::string replaceAll(std::string result,
const std::string& replaceWhat,
@@ -429,6 +435,7 @@
}
return result;
}
+#endif
int Support::run_command(const std::string& rawcmd, std::string& output)
diff -r 91c4509b5ec5 -r 796b179c92df test/unit/TerraSolidTest.cpp
--- a/test/unit/TerraSolidTest.cpp Sun Aug 14 22:06:34 2011 -0500
+++ b/test/unit/TerraSolidTest.cpp Mon Aug 15 07:12:43 2011 -0700
@@ -45,6 +45,11 @@
#include <iostream>
+#ifdef PDAL_COMPILER_GCC
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#endif
+
using namespace pdal;
BOOST_AUTO_TEST_SUITE(TerraSolidReaderTest)
More information about the Liblas-commits
mailing list