]> www.ginac.de Git - ginac.git/commitdiff
Fix some pedantic compiler warnings.
authorRichard Kreckel <kreckel@ginac.de>
Sun, 8 Nov 2015 22:18:19 +0000 (23:18 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 8 Nov 2015 22:18:19 +0000 (23:18 +0100)
Found with CLang++ -Wall. (There remain some more, but these are
more ugly to fix.)

ginac/basic.h
ginac/factor.cpp
ginac/numeric.cpp
ginac/ptr.h

index f11db911aee78ff3cf193819be6771db3b521abc..0295d015920e1807464d51c5df309e25abd82a7d 100644 (file)
@@ -39,7 +39,7 @@
 namespace GiNaC {
 
 class ex;
 namespace GiNaC {
 
 class ex;
-class ex_is_less;
+struct ex_is_less;
 class symbol;
 class numeric;
 class relational;
 class symbol;
 class numeric;
 class relational;
index 33b8f50125ed853f36ff9a0ceb3480504419e61f..8f8c87e858340e625df38a3bffe1fb3cfc0356fa 100644 (file)
@@ -679,7 +679,9 @@ typedef vector<cl_MI> mvec;
 
 class modular_matrix
 {
 
 class modular_matrix
 {
+#ifdef DEBUGFACTOR
        friend ostream& operator<<(ostream& o, const modular_matrix& m);
        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_)
        {
 public:
        modular_matrix(size_t r_, size_t c_, const cl_MI& init) : r(r_), c(c_)
        {
index 209cb7000b0db6043293245303003782334462f4..c86369fbe000cc2f885dac04a19ddcddb9c56394 100644 (file)
@@ -2023,7 +2023,7 @@ lanczos_coeffs::lanczos_coeffs()
        coeffs[3].swap(coeffs_120);
 }
 
        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))
 {
        cln::float_format_t prec = cln::default_float_format;
        if (!instanceof(realpart(x), cln::cl_RA_ring))
index 76c3ee7e4b21c40e199ced9f1cd580788388aa6d..0f5dae37e752f172ec98759c443dffe3c2db5dfb 100644 (file)
@@ -54,7 +54,7 @@ private:
  *      from refcounted)
  *    T* T::duplicate() member function (only if makewriteable() is used) */
 template <class T> class ptr {
  *      from refcounted)
  *    T* T::duplicate() member function (only if makewriteable() is used) */
 template <class T> class ptr {
-       friend class std::less<ptr<T>>;
+       friend struct std::less<ptr<T>>;
 
        // NB: This implementation of reference counting is not thread-safe.
        // The reference counter needs to be incremented/decremented atomically,
 
        // NB: This implementation of reference counting is not thread-safe.
        // The reference counter needs to be incremented/decremented atomically,