Fix warning "control reaches end of non-void function".
Richard Kreckel [Sat, 22 Oct 2011 19:37:13 +0000 (21:37 +0200)]
Being careful about this is required to pass the openSUSE build process.

ginac/polynomial/mgcd.cpp

index cad99be..9eb535a 100644 (file)
@@ -40,6 +40,7 @@ static cln::cl_I extract_integer_content(ex& Apr, const ex& A)
 {
        static const cln::cl_I n1(1);
        const numeric icont_ = A.integer_content();
+       GINAC_ASSERT(cln::instanceof(icont_.to_cl_N(), cln::cl_RA_ring));
        if (cln::instanceof(icont_.to_cl_N(), cln::cl_I_ring)) {
                const cln::cl_I icont = cln::the<cln::cl_I>(icont_.to_cl_N());
                if (icont != 1) {
@@ -49,14 +50,12 @@ static cln::cl_I extract_integer_content(ex& Apr, const ex& A)
                        Apr = A;
                        return n1;
                }
-       }
-       if (cln::instanceof(icont_.to_cl_N(), cln::cl_RA_ring)) {
+       } else {
                Apr = (A/icont_).expand();
                // A is a polynomail over rationals, so GCD is defined
                // up to arbitrary rational number.
                return n1;
        }
-       GINAC_ASSERT(NULL == "expected polynomial over integers or rationals");
 }
 
 ex chinrem_gcd(const ex& A_, const ex& B_, const exvector& vars)