# HG changeset patch # User Rik # Date 1453599897 28800 # Node ID 623fc7d08cc68180beeca8fb5f2f6fca5c1ec947 # Parent 7cac4e7458f24d52969b231c179d5558480aa62d maint: Clean up compile warnings in liboctave from cset 7cac4e7458f2. * Sparse.h (range_error): Mark function with OCTAVE_NORETURN attribute. * Sparse.h (read_sparse_matrix): "return is" at end of fcn. * dSparse.cc (tinverse): Delete unused inverse_singular label. * idx-vector.h (as_array, sort_idx): Mark function with OCTAVE_NORETURN. * Quad.h (do_integrate): Mark unreachable do_integrate combinations with OCTAVE_NORETURN. diff -r 7cac4e7458f2 -r 623fc7d08cc6 liboctave/array/Sparse.h --- a/liboctave/array/Sparse.h Sat Jan 23 13:52:03 2016 -0800 +++ b/liboctave/array/Sparse.h Sat Jan 23 17:44:57 2016 -0800 @@ -294,14 +294,18 @@ octave_idx_type compute_index (const Array& ra_idx) const; - T range_error (const char *fcn, octave_idx_type n) const; - T& range_error (const char *fcn, octave_idx_type n); + OCTAVE_NORETURN T range_error (const char *fcn, octave_idx_type n) const; + OCTAVE_NORETURN T& range_error (const char *fcn, octave_idx_type n); - T range_error (const char *fcn, octave_idx_type i, octave_idx_type j) const; - T& range_error (const char *fcn, octave_idx_type i, octave_idx_type j); + OCTAVE_NORETURN T range_error (const char *fcn, + octave_idx_type i, octave_idx_type j) const; + OCTAVE_NORETURN T& range_error (const char *fcn, + octave_idx_type i, octave_idx_type j); - T range_error (const char *fcn, const Array& ra_idx) const; - T& range_error (const char *fcn, const Array& ra_idx); + OCTAVE_NORETURN T range_error (const char *fcn, + const Array& ra_idx) const; + OCTAVE_NORETURN T& range_error (const char *fcn, + const Array& ra_idx); // No checking, even for multiple references, ever. @@ -775,6 +779,8 @@ for (octave_idx_type j = jold; j < nc; j++) a.cidx (j+1) = ii; } + + return is; } #endif diff -r 7cac4e7458f2 -r 623fc7d08cc6 liboctave/array/dSparse.cc --- a/liboctave/array/dSparse.cc Sat Jan 23 13:52:03 2016 -0800 +++ b/liboctave/array/dSparse.cc Sat Jan 23 17:44:57 2016 -0800 @@ -1143,9 +1143,6 @@ } return retval; - -inverse_singular: - return SparseMatrix (); } SparseMatrix diff -r 7cac4e7458f2 -r 623fc7d08cc6 liboctave/array/idx-vector.h --- a/liboctave/array/idx-vector.h Sat Jan 23 13:52:03 2016 -0800 +++ b/liboctave/array/idx-vector.h Sat Jan 23 17:44:57 2016 -0800 @@ -103,7 +103,7 @@ // i/o virtual std::ostream& print (std::ostream& os) const = 0; - virtual Array as_array (void); + OCTAVE_NORETURN virtual Array as_array (void); octave_refcount count; @@ -137,7 +137,7 @@ idx_base_rep *sort_uniq_clone (bool = false) { count++; return this; } - idx_base_rep *sort_idx (Array&); + OCTAVE_NORETURN idx_base_rep *sort_idx (Array&); bool is_colon_equiv (octave_idx_type) const { return true; } diff -r 7cac4e7458f2 -r 623fc7d08cc6 liboctave/numeric/Quad.h --- a/liboctave/numeric/Quad.h Sat Jan 23 13:52:03 2016 -0800 +++ b/liboctave/numeric/Quad.h Sat Jan 23 17:44:57 2016 -0800 @@ -143,8 +143,8 @@ double do_integrate (octave_idx_type& ier, octave_idx_type& neval, double& abserr); - float do_integrate (octave_idx_type& ier, octave_idx_type& neval, - float& abserr); + OCTAVE_NORETURN float do_integrate (octave_idx_type& ier, + octave_idx_type& neval, float& abserr); private: @@ -173,8 +173,8 @@ double do_integrate (octave_idx_type& ier, octave_idx_type& neval, double& abserr); - float do_integrate (octave_idx_type& ier, octave_idx_type& neval, - float& abserr); +OCTAVE_NORETURN float do_integrate (octave_idx_type& ier, + octave_idx_type& neval, float& abserr); private: @@ -206,8 +206,8 @@ ~FloatDefQuad (void) { } - double do_integrate (octave_idx_type& ier, octave_idx_type& neval, - double& abserr); + OCTAVE_NORETURN double do_integrate (octave_idx_type& ier, + octave_idx_type& neval, double& abserr); float do_integrate (octave_idx_type& ier, octave_idx_type& neval, float& abserr); @@ -236,8 +236,8 @@ ~FloatIndefQuad (void) { } - double do_integrate (octave_idx_type& ier, octave_idx_type& neval, - double& abserr); + OCTAVE_NORETURN double do_integrate (octave_idx_type& ier, + octave_idx_type& neval, double& abserr); float do_integrate (octave_idx_type& ier, octave_idx_type& neval, float& abserr);