From 032c3ecb18ca3ac4823424aaf072f2deb28a987c Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Thu, 25 Mar 2004 02:19:42 +0000 Subject: [PATCH] Protect against gcc's "warning: cast does not match function type". --- crypto/bio/b_print.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 */ -- 2.40.0