|
135 | 135 | f_cmp_divisor (const void *parg, const void *qarg)
|
136 | 136 | {
|
137 | 137 | const struct factor_t *p, *q;
|
138 |
| - p = parg; |
139 |
| - q = qarg; |
| 138 | + p = (const struct factor_t *) parg; |
| 139 | + q = (const struct factor_t *) qarg; |
140 | 140 | if (p->divisor > q->divisor)
|
141 | 141 | return 1;
|
142 | 142 | else if (p->divisor < q->divisor)
|
|
149 | 149 | f_cmp_fraction (const void *parg, const void *qarg)
|
150 | 150 | {
|
151 | 151 | const struct factor_t *p, *q;
|
152 |
| - p = parg; |
153 |
| - q = qarg; |
| 152 | + p = (const struct factor_t *) parg; |
| 153 | + q = (const struct factor_t *) qarg; |
154 | 154 | if (p->fraction > q->fraction)
|
155 | 155 | return 1;
|
156 | 156 | else if (p->fraction < q->fraction)
|
@@ -212,7 +212,7 @@ generate_sq_res_0x100 (int limb_bits)
|
212 | 212 | int i, res;
|
213 | 213 |
|
214 | 214 | nsq_res_0x100 = (0x100 + limb_bits - 1) / limb_bits;
|
215 |
| - sq_res_0x100 = xmalloc (nsq_res_0x100 * sizeof (*sq_res_0x100)); |
| 215 | + sq_res_0x100 = (mpz_t *) xmalloc (nsq_res_0x100 * sizeof (*sq_res_0x100)); |
216 | 216 |
|
217 | 217 | for (i = 0; i < nsq_res_0x100; i++)
|
218 | 218 | mpz_init_set_ui (sq_res_0x100[i], 0L);
|
@@ -243,8 +243,8 @@ generate_mod (int limb_bits, int nail_bits)
|
243 | 243 | /* no more than limb_bits many factors in a one limb modulus (and of
|
244 | 244 | course in reality nothing like that many) */
|
245 | 245 | factor_alloc = limb_bits;
|
246 |
| - factor = xmalloc (factor_alloc * sizeof (*factor)); |
247 |
| - rawfactor = xmalloc (factor_alloc * sizeof (*rawfactor)); |
| 246 | + factor = (struct factor_t *) xmalloc (factor_alloc * sizeof (*factor)); |
| 247 | + rawfactor = (struct rawfactor_t *) xmalloc (factor_alloc * sizeof (*rawfactor)); |
248 | 248 |
|
249 | 249 | if (numb_bits % 4 != 0)
|
250 | 250 | {
|
|
0 commit comments