[Liblas-commits] hg: ignore unused parameter when no HAVE_GDAL

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Jun 23 15:57:01 EDT 2011


details:   http://hg.liblas.orghg/rev/35d23fe15154
changeset: 3004:35d23fe15154
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Jun 23 14:40:23 2011 -0500
description:
ignore unused parameter when no HAVE_GDAL
Subject: hg: ignore unused parameter when no HAVE_GDAL

details:   http://hg.liblas.orghg/rev/2ccda9fbe7d4
changeset: 3005:2ccda9fbe7d4
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Jun 23 14:45:40 2011 -0500
description:
ignore unused parameter when no HAVE_GDAL
Subject: hg: clean up type comparison warning

details:   http://hg.liblas.orghg/rev/64eaab02ad89
changeset: 3006:64eaab02ad89
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Jun 23 14:56:47 2011 -0500
description:
clean up type comparison warning
Subject: hg: clean up unused parameter warnings

details:   http://hg.liblas.orghg/rev/ccdb2052657f
changeset: 3007:ccdb2052657f
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Jun 23 14:56:54 2011 -0500
description:
clean up unused parameter warnings

diffstat:

 include/liblas/detail/opt_allocator.hpp |  3 +++
 src/c_api.cpp                           |  2 +-
 src/spatialreference.cpp                |  3 +++
 3 files changed, 7 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r 370cddd89833 -r ccdb2052657f include/liblas/detail/opt_allocator.hpp
--- a/include/liblas/detail/opt_allocator.hpp	Thu Jun 23 14:35:03 2011 -0500
+++ b/include/liblas/detail/opt_allocator.hpp	Thu Jun 23 14:56:54 2011 -0500
@@ -107,6 +107,7 @@
 
     opt_allocator(const opt_allocator<T>& other )
     {
+        boost::ignore_unused_variable_warning(other);
     }
 
     template <typename U>
@@ -161,6 +162,8 @@
         }
         else
             ::operator delete(p);
+
+        boost::ignore_unused_variable_warning(num);
     }
 
     void construct(pointer p, const_reference value)
diff -r 370cddd89833 -r ccdb2052657f src/c_api.cpp
--- a/src/c_api.cpp	Thu Jun 23 14:35:03 2011 -0500
+++ b/src/c_api.cpp	Thu Jun 23 14:56:54 2011 -0500
@@ -550,7 +550,7 @@
         if (d.size() != size)
         {
             d.resize(size);
-            d.assign(0, size);
+            d.assign(0, d.size());
         }
                 
         for (boost::uint16_t i=0; i < size; i++) {
diff -r 370cddd89833 -r ccdb2052657f src/spatialreference.cpp
--- a/src/spatialreference.cpp	Thu Jun 23 14:35:03 2011 -0500
+++ b/src/spatialreference.cpp	Thu Jun 23 14:56:54 2011 -0500
@@ -137,6 +137,7 @@
     return bool(output == 1);
     
 #else
+    boost::ignore_unused_variable_warning(input);
     throw std::runtime_error ("SpatialReference equality testing not available without GDAL+libgeotiff support");
 #endif
 
@@ -938,6 +939,8 @@
     return ostr;
 
 #else
+    boost::ignore_unused_variable_warning(ostr);
+    boost::ignore_unused_variable_warning(srs);
     throw std::runtime_error("SpatialReference io operator<< is not available without GDAL+libgeotiff support");
 #endif
 }


More information about the Liblas-commits mailing list