Fix compiler warning in dtoa.c

This commit is contained in:
Victor Stinner 2015-03-18 15:01:44 +01:00
parent 59f7fb29ec
commit 938b0b9fee
1 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@ Balloc(int k)
x = 1 << k; x = 1 << k;
len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1) len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
/sizeof(double); /sizeof(double);
if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) { if (k <= Kmax && pmem_next - private_mem + len <= (Py_ssize_t)PRIVATE_mem) {
rv = (Bigint*)pmem_next; rv = (Bigint*)pmem_next;
pmem_next += len; pmem_next += len;
} }
@ -1087,7 +1087,7 @@ sd2b(U *d, int scale, int *e)
b = Balloc(1); b = Balloc(1);
if (b == NULL) if (b == NULL)
return NULL; return NULL;
/* First construct b and e assuming that scale == 0. */ /* First construct b and e assuming that scale == 0. */
b->wds = 2; b->wds = 2;
b->x[0] = word1(d); b->x[0] = word1(d);