From bcb7f64ea55480585b546b462a3a2891765c400b Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 20 Apr 2006 21:41:16 +0000 Subject: shut up gcc --- src/libmp/port/mptouv.c | 6 ++++++ src/libmp/port/mptov.c | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'src/libmp') diff --git a/src/libmp/port/mptouv.c b/src/libmp/port/mptouv.c index eb663f38..9cb74ea4 100644 --- a/src/libmp/port/mptouv.c +++ b/src/libmp/port/mptouv.c @@ -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; diff --git a/src/libmp/port/mptov.c b/src/libmp/port/mptov.c index 86da9943..b24b8e3e 100644 --- a/src/libmp/port/mptov.c +++ b/src/libmp/port/mptov.c @@ -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; -- cgit v1.2.3