From c67e8c9246ba6e51fb9f35da4bec8e23a744f4f7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 25 Dec 2017 14:21:54 +0100 Subject: [PATCH] Fix compiler warnings in matrix.cpp Add a return clause, because assert() may be replaced with nothing by the preprocessor under -DNDEBUG. matrix.cpp: In member function 'std::vector libnormaliz::Matrix::VxM_div(const std::vector&, const Integer&, bool&) const [with Integer = double]': matrix.cpp:942:1: warning: no return statement in function returning non-void [-Wreturn-type] matrix.cpp:2262:1: warning: no return statement in function returning non-void [-Wreturn-type] matrix.cpp:2696:1: warning: no return statement in function returning non-void [-Wreturn-type] --- source/libnormaliz/matrix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libnormaliz/matrix.cpp b/source/libnormaliz/matrix.cpp index ebec2958..c551c4d2 100644 --- a/source/libnormaliz/matrix.cpp +++ b/source/libnormaliz/matrix.cpp @@ -939,6 +939,7 @@ vector Matrix::VxM_div(const vector& v, const Integer template<> vector Matrix::VxM_div(const vector& v, const nmz_float& divisor, bool& success) const{ assert(false); + return {}; } //--------------------------------------------------------------------------- @@ -2259,6 +2260,7 @@ template<> bool Matrix::SmithNormalForm_inner(size_t& rk, Matrix& Right){ assert(false); + return {}; } // Converts "this" into Smith normal form, returns column transformation matrix @@ -2693,6 +2695,7 @@ vector Matrix::optimal_subdivision_point() const{ template<> vector Matrix::optimal_subdivision_point_inner() const{ assert(false); + return {}; } /* -- 2.15.1