fix format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/demo/demo.c b/demo/demo.c
index c1fcfcd..d60d559 100644
--- a/demo/demo.c
+++ b/demo/demo.c
@@ -723,14 +723,14 @@ printf("compare no compare!\n"); return EXIT_FAILURE;
FGETS(buf, 4095, stdin);
mp_read_radix(&a, buf, 64);
FGETS(buf, 4095, stdin);
- sscanf(buf, "%d", &rr);
+ sscanf(buf, "%u", &rr);
FGETS(buf, 4095, stdin);
mp_read_radix(&b, buf, 64);
mp_mul_2d(&a, rr, &a);
a.sign = b.sign;
if (mp_cmp(&a, &b) != MP_EQ) {
- printf("mul2d failed, rr == %d\n", rr);
+ printf("mul2d failed, rr == %u\n", rr);
draw(&a);
draw(&b);
return EXIT_FAILURE;
@@ -740,7 +740,7 @@ printf("compare no compare!\n"); return EXIT_FAILURE;
FGETS(buf, 4095, stdin);
mp_read_radix(&a, buf, 64);
FGETS(buf, 4095, stdin);
- sscanf(buf, "%d", &rr);
+ sscanf(buf, "%u", &rr);
FGETS(buf, 4095, stdin);
mp_read_radix(&b, buf, 64);
@@ -750,7 +750,7 @@ printf("compare no compare!\n"); return EXIT_FAILURE;
a.sign = b.sign = MP_ZPOS;
}
if (mp_cmp(&a, &b) != MP_EQ) {
- printf("div2d failed, rr == %d\n", rr);
+ printf("div2d failed, rr == %u\n", rr);
draw(&a);
draw(&b);
return EXIT_FAILURE;
diff --git a/etc/pprime.c b/etc/pprime.c
index fc2322a..ea77181 100644
--- a/etc/pprime.c
+++ b/etc/pprime.c
@@ -143,7 +143,7 @@ static void gen_prime(void)
} while (x == 0);
if (r > 31) {
fwrite(&r, 1, sizeof(mp_digit), out);
- printf("%9d\r", r);
+ printf("%9u\r", r);
fflush(stdout);
}
if (r < 31) break;