Commit 7d4c8a0a authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot

Merge topic 'vxl-unused-args-patch'

2a71eeda vxl: add a patch to address unused argument warnings
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !197
parents d6cc8fd9 2a71eeda
diff -u -Nru5 vxl-cmb-git62f6b76/core/vnl/vnl_matrix_fixed.h vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_matrix_fixed.h
--- vxl-cmb-git62f6b76/core/vnl/vnl_matrix_fixed.h 2015-04-20 00:01:10.000000000 -0400
+++ vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_matrix_fixed.h 2016-10-04 09:59:13.635743261 -0400
@@ -126,11 +126,16 @@
// vnl_matrix, so that algorithms can template over the matrix type
// itself. It is illegal to call this constructor without
// <tt>n==num_rows</tt> and <tt>m==num_cols</tt>.
vnl_matrix_fixed( unsigned n, unsigned m )
{
+#ifndef NDEBUG
assert( n == num_rows && m == num_cols );
+#else
+ (void)n;
+ (void)m;
+#endif
}
//: Construct an m*n matrix and fill with value
explicit vnl_matrix_fixed(T value)
{
@@ -625,10 +630,13 @@
// This function does or tests nothing if NDEBUG is defined
void assert_size(unsigned nr_rows, unsigned nr_cols) const
{
#ifndef NDEBUG
assert_size_internal(nr_rows, nr_cols);
+#else
+ (void)nr_rows;
+ (void)nr_cols;
#endif
}
//: abort if matrix contains any INFs or NANs.
// This function does or tests nothing if NDEBUG is defined
diff -u -Nru5 vxl-cmb-git62f6b76/core/vnl/vnl_matrix.h vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_matrix.h
--- vxl-cmb-git62f6b76/core/vnl/vnl_matrix.h 2015-04-20 00:01:10.000000000 -0400
+++ vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_matrix.h 2016-10-04 09:53:08.984429995 -0400
@@ -564,10 +564,13 @@
// This function does or tests nothing if NDEBUG is defined
void assert_size(unsigned r, unsigned c) const
{
#ifndef NDEBUG
assert_size_internal(r, c);
+#else
+ (void)r;
+ (void)c;
#endif
}
//: abort if matrix contains any INFs or NANs.
// This function does or tests nothing if NDEBUG is defined
void assert_finite() const
diff -u -Nru5 vxl-cmb-git62f6b76/core/vnl/vnl_vector_fixed.h vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_vector_fixed.h
--- vxl-cmb-git62f6b76/core/vnl/vnl_vector_fixed.h 2015-04-20 00:01:10.000000000 -0400
+++ vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_vector_fixed.h 2016-10-04 09:57:12.573635241 -0400
@@ -413,11 +413,17 @@
// Element i swaps with element size()-1-i
vnl_vector_fixed& flip();
//: Check that size()==sz if not, abort();
// This function does or tests nothing if NDEBUG is defined
- void assert_size( unsigned sz ) const { assert( sz == n ); }
+ void assert_size( unsigned sz ) const {
+#ifndef NDEBUG
+ assert( sz == n );
+#else
+ (void)sz;
+#endif
+ }
//: Check that this is finite if not, abort();
// This function does or tests nothing if NDEBUG is defined
void assert_finite() const
{
diff -u -Nru5 vxl-cmb-git62f6b76/core/vnl/vnl_vector.h vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_vector.h
--- vxl-cmb-git62f6b76/core/vnl/vnl_vector.h 2015-04-20 00:01:10.000000000 -0400
+++ vxl-cmb-git62f6b76.unused-arguments/core/vnl/vnl_vector.h 2016-10-04 09:52:44.501610384 -0400
@@ -369,10 +369,12 @@
//: Check that size()==sz if not, abort();
// This function does or tests nothing if NDEBUG is defined
void assert_size(unsigned sz) const {
#ifndef NDEBUG
assert_size_internal(sz);
+#else
+ (void)sz;
#endif
}
//: Check that this is finite if not, abort();
// This function does or tests nothing if NDEBUG is defined
......@@ -37,5 +37,8 @@ superbuild_add_project(vxl
-DBUILD_VGUI:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>)
superbuild_apply_patch(vxl unused-args-release
"Fix unused argument warnings in headers")
superbuild_add_extra_cmake_args(
-DVXL_DIR:PATH=<INSTALL_DIR>/share/vxl/cmake)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment