This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strange warning in gsl_matrix_float_set


On 15 Oct, Brian Gough wrote:
> Ivo Alxneit writes:
> 
>  > gcc -O2 -march=i386 -mcpu=i686 -pipe -pedantic -Wall -W -Wmissing-prototypes
>  >  -Wstrict-prototypes -Wtraditional -Wconversion -Wshadow -Wpointer-arith
>  >  -Wcast-qual -Wcast-align -Wwrite-strings -fshort-enums -fno-common -Wnested-externs 
>  >  -Dinline= -g     -I/usr/X11R6/include    -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L 
>  >  -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE     -DFUNCPROTO=15 -DNARROWPROTO
>  >  -c -o read_as_int.o read_as_int.c
>  > read_as_int.c: In function `read_as_int':
>  > read_as_int.c:14: warning: passing arg 4 of `gsl_matrix_float_set' as `float' rather 
>  > than `double' due to prototype
> 
> See the section on -Wconversion in the GCC Manual for a description of
> the warning.
well according to the mainual -Wconversion deals with warnings due to
signed/unsigned variables. i get a waring due to float/double even
though the prototype in gsl_matrix_float.h is

void    gsl_matrix_float_set(gsl_matrix_float * m, const size_t i, const
size_t j, const float x);

i.e. const float for the fourth argument. gcc sees a double in the
prototype. am i really supposed to use a cast to get rid of the warning?
-- 
Dr. Ivo Alxneit
Laboratory for Solar Technology   phone: +41 56 310 4092
CH-5232 Villigen                    fax: +41 56 310 2624
Paul Scherrer Institute          http://solar.web.psi.ch
Switzerland                        gnupg key: 0x515E30C7

Attachment: msg00042/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]