This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: warning in modfl
- From: Craig Howland <howland at LGSInnovations dot com>
- To: newlib at sourceware dot org
- Date: Mon, 18 Nov 2013 13:37:24 -0500
- Subject: Re: warning in modfl
- Authentication-results: sourceware.org; auth=none
- References: <528A58C7 dot 9000406 at oarcorp dot com>
On 11/18/2013 01:13 PM, Joel Sherrill wrote:
Hi
Any thoughts on how to fix this warning?
../../../../../newlib-cvs/src/newlib/libm/common/modfl.c: In function
'modfl':
../../../../../newlib-cvs/src/newlib/libm/common/modfl.c:39:3: warning:
passing argument 2 of 'modf' from incompatible pointer type [enabled by
default]
return modf(x, iptr);
^
In file included from
../../../../../newlib-cvs/src/newlib/libm/common/modfl.c:31:0:
/users/joel/test-gcc/newlib-cvs/src/newlib/libc/include/math.h:114:15:
note: expected 'double *' but argument is of type 'long double *'
extern double modf _PARAMS((double, double *));
This file is dedicated for long double=double, so just a cast:
return modf(x, (double *) iptr);