Commit b6fa97c591f40937d2f08836605de4b11dee081b

Francois Perrad 2018-12-27T09:19:57

explicit operator precedence

diff --git a/demo/demo.c b/demo/demo.c
index 1771073..2bb2ed3 100644
--- a/demo/demo.c
+++ b/demo/demo.c
@@ -284,7 +284,7 @@ int main(void)
             printf("Failed executing mp_jacobi(%d | %lu) %s.\n", n, jacobi[cnt].n, mp_error_to_string(err));
             return EXIT_FAILURE;
          }
-         if (err == MP_OKAY && i != jacobi[cnt].c[n + 5]) {
+         if ((err == MP_OKAY) && (i != jacobi[cnt].c[n + 5])) {
             printf("Failed trivial mp_jacobi(%d | %lu) %d != %d\n", n, jacobi[cnt].n, i, jacobi[cnt].c[n + 5]);
             return EXIT_FAILURE;
          }
@@ -322,7 +322,7 @@ int main(void)
             printf("Failed executing mp_kronecker(%ld | %ld) %s.\n", kronecker[cnt].n, m, mp_error_to_string(err));
             return EXIT_FAILURE;
          }
-         if (err == MP_OKAY && i != kronecker[cnt].c[m + 10]) {
+         if ((err == MP_OKAY) && (i != kronecker[cnt].c[m + 10])) {
             printf("Failed trivial mp_kronecker(%ld | %ld) %d != %d\n", kronecker[cnt].n, m, i, kronecker[cnt].c[m + 10]);
             return EXIT_FAILURE;
          }
@@ -544,7 +544,7 @@ int main(void)
    }
 
    printf("\n\nTesting: mp_get_long\n");
-   for (i = 0; i < (int)(sizeof(unsigned long)*CHAR_BIT) - 1; ++i) {
+   for (i = 0; i < ((int)(sizeof(unsigned long)*CHAR_BIT) - 1); ++i) {
       t = (1ULL << (i+1)) - 1;
       if (!t)
          t = -1;
@@ -564,7 +564,7 @@ int main(void)
    }
 
    printf("\n\nTesting: mp_get_long_long\n");
-   for (i = 0; i < (int)(sizeof(unsigned long long)*CHAR_BIT) - 1; ++i) {
+   for (i = 0; i < ((int)(sizeof(unsigned long long)*CHAR_BIT) - 1); ++i) {
       r = (1ULL << (i+1)) - 1;
       if (!r)
          r = -1;