]> www.ginac.de Git - cln.git/commitdiff
Avoid some "suggest explicit braces to avoid ambiguous ‘else’" warnings.
authorBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 13:07:44 +0000 (14:07 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 13:07:44 +0000 (14:07 +0100)
src/integer/bitwise/cl_I_ldbxtest.cc
src/numtheory/cl_nt_sqrtmodp.cc

index 54d4eaff16b10afe56eae7b52e6d3569b73b2e94..980e79d04a6424bbe719287ee254f9a968ce74e8 100644 (file)
@@ -41,13 +41,14 @@ bool ldb_extract_test (const cl_I& x, uintC p, uintC q)
       // Ein AND 2^(q+1)-1 erreicht dies.
       // Vom letzten Digit müssen die hinteren p Bits unberücksichtigt bleiben.
       // Ein AND -2^p erreicht dies.
-      if (--len==0)
+      if (--len==0) {
         // 1 Digit maßgeblich, wird von beiden Seiten angeschnitten:
         // Ein AND 2^(q+1)-2^p erreicht dies.
         if (!(((uintD)(bitm(q+1)-bit(p)) & mspref(MSDptr,0)) == 0))
           return true;
-          else
+        else
           return false;
+      }
       // mindestens 2 Digits. Teste erst die Randdigits, dann die inneren:
       if (!(((msprefnext(MSDptr) & (uintD)(bitm(q+1)-1)) == 0) &&
             ((lsprefnext(LSDptr) & (uintD)(minus_bit(p))) == 0)
index 3727ff9851cf1b9afaa7b3b5662996ab34d31efe..5f804edc929da1a90ec5db70c9e23c4e02a1dee6 100644 (file)
@@ -113,12 +113,13 @@ static const sqrt_mod_p_t cantor_zassenhaus_sqrt (const cl_modint_ring& R, const
                };
                const gcd_result gcd (const pol2& u)
                {
-                       if (zerop(u.c1))
+                       if (zerop(u.c1)) {
                                // constant polynomial u(X)
                                if (zerop(u.c0))
                                        return gcd_result(2);
                                else
                                        return gcd_result(0);
+                       }
                        // u(X) = c0 + c1*X has zero -c0/c1.
                        var cl_MI_x c1inv = R->recip(u.c1);
                        if (c1inv.condition)