shut up gcc

This commit is contained in:
rsc 2006-04-20 21:41:16 +00:00
parent 35afcc6c77
commit bcb7f64ea5
2 changed files with 12 additions and 0 deletions

View file

@ -22,10 +22,16 @@ uvtomp(uvlong v, mpint *b)
return b;
for(s = 0; s < VLDIGITS && v != 0; s++){
b->p[s] = v;
/* !@*$&!@$ gcc gives warnings about the >> here
* when running on 64-bit machines, even though
* it's in dead code. fake it out with two shifts.
if(sizeof(mpdigit) == sizeof(uvlong))
v = 0;
else
v >>= sizeof(mpdigit)*8;
*/
v >>= sizeof(mpdigit)*4;
v >>= sizeof(mpdigit)*4;
}
b->top = s;
return b;

View file

@ -28,10 +28,16 @@ vtomp(vlong v, mpint *b)
uv = v;
for(s = 0; s < VLDIGITS && uv != 0; s++){
b->p[s] = uv;
/* !@*$&!@$ gcc gives warnings about the >> here
* when running on 64-bit machines, even though
* it's in dead code. fake it out with two shifts.
if(sizeof(mpdigit) == sizeof(uvlong))
uv = 0;
else
uv >>= sizeof(mpdigit)*8;
*/
uv >>= sizeof(mpdigit)*4;
uv >>= sizeof(mpdigit)*4;
}
b->top = s;
return b;