From: Geoff Thorpe Date: Thu, 25 Mar 2004 02:19:42 +0000 (+0000) Subject: Protect against gcc's "warning: cast does not match function type". X-Git-Tag: OpenSSL_0_9_7e~130^2~30 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=032c3ecb18ca3ac4823424aaf072f2deb28a987c Protect against gcc's "warning: cast does not match function type". --- diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index decefc2276..47b04396d7 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -619,6 +619,7 @@ fmtfp( int caps = 0; long intpart; long fracpart; + long max10; if (max < 0) max = 6; @@ -639,11 +640,12 @@ fmtfp( /* we "cheat" by converting the fractional part to integer by multiplying by a factor of 10 */ - fracpart = roundv((pow10(max)) * (ufvalue - intpart)); + max10 = roundv(pow10(max)); + fracpart = roundv(pow10(max) * (ufvalue - intpart)); - if (fracpart >= (long)pow10(max)) { + if (fracpart >= max10) { intpart++; - fracpart -= (long)pow10(max); + fracpart -= max10; } /* convert integer part */