mpz_array_init warnings
John Tromp
John.Tromp at cwi.nl
Thu Jun 16 18:53:10 CEST 2005
dear GMP experts,
I have a piece of code:
mpz_t *olda, *newa;
olda = (mpz_t *)calloc(cnt, sizeof(mpz_t));
assert(olda != NULL);
printf("allocated space for %d references of size %d\n", cnt, sizeof(mpz_t));
mpz_array_init(olda, cnt, nbits);
that gives me the following warnings
legal.c:30: warning: passing arg 1 of `__gmpz_array_init' from incompatible pointer type
Yet the documentation states the type of the first argument as mpz_t[].
Isn't that the same as *mpz_t?
How do I get rid of these warnings?
I cannot declare olda as an array since I compute its size dynamically
and it can be 100s of millions of entries long...
regards,
%!PS % -John Tromp (http://www.cwi.nl/~tromp/)
42 42 scale 7 9 translate .07 setlinewidth .5 setgray/c{arc clip fill
setgray}def 1 0 0 42 1 0 c 0 1 1{0 3 3 90 270 arc 0 0 6 0 -3 3 90 270
arcn 270 90 c -2 2 4{-6 moveto 0 12 rlineto}for -5 2 5{-3 exch moveto
9 0 rlineto}for stroke 0 0 3 1 1 0 c 180 rotate initclip}for showpage
More information about the gmp-discuss
mailing list