From: Michael W. Hudson Date: Thu, 30 Jun 2005 00:02:26 +0000 (+0000) Subject: Apparently some compiler gives a warning on X-Git-Tag: v2.5a0~1631 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3095ad06505d5b0606a2b1d96a624ba0d9db921e;p=python Apparently some compiler gives a warning on float y = x; when x is a double. Go figure. --- diff --git a/Objects/floatobject.c b/Objects/floatobject.c index c95b5c9edb..d02e053c8d 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -1427,7 +1427,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le) return -1; } else { - float y = x; + float y = (float)x; const char *s = (char*)&y; int i, incr = 1;