From: Richard Kreckel Date: Sun, 8 Nov 2015 22:18:19 +0000 (+0100) Subject: Fix some pedantic compiler warnings. X-Git-Tag: release_1-7-0~7^2~57 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=852fb174c43b49a3ce1b568f959d23e8a1959ee1;ds=sidebyside Fix some pedantic compiler warnings. Found with CLang++ -Wall. (There remain some more, but these are more ugly to fix.) --- diff --git a/ginac/basic.h b/ginac/basic.h index f11db911..0295d015 100644 --- a/ginac/basic.h +++ b/ginac/basic.h @@ -39,7 +39,7 @@ namespace GiNaC { class ex; -class ex_is_less; +struct ex_is_less; class symbol; class numeric; class relational; diff --git a/ginac/factor.cpp b/ginac/factor.cpp index 33b8f501..8f8c87e8 100644 --- a/ginac/factor.cpp +++ b/ginac/factor.cpp @@ -679,7 +679,9 @@ typedef vector mvec; class modular_matrix { +#ifdef DEBUGFACTOR friend ostream& operator<<(ostream& o, const modular_matrix& m); +#endif public: modular_matrix(size_t r_, size_t c_, const cl_MI& init) : r(r_), c(c_) { diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 209cb700..c86369fb 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -2023,7 +2023,7 @@ lanczos_coeffs::lanczos_coeffs() coeffs[3].swap(coeffs_120); } -static const cln::float_format_t guess_precision(const cln::cl_N& x) +static cln::float_format_t guess_precision(const cln::cl_N& x) { cln::float_format_t prec = cln::default_float_format; if (!instanceof(realpart(x), cln::cl_RA_ring)) diff --git a/ginac/ptr.h b/ginac/ptr.h index 76c3ee7e..0f5dae37 100644 --- a/ginac/ptr.h +++ b/ginac/ptr.h @@ -54,7 +54,7 @@ private: * from refcounted) * T* T::duplicate() member function (only if makewriteable() is used) */ template class ptr { - friend class std::less>; + friend struct std::less>; // NB: This implementation of reference counting is not thread-safe. // The reference counter needs to be incremented/decremented atomically,