public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* strange warning in gsl_matrix_float_set
@ 2002-10-15  2:04 Ivo Alxneit
  0 siblings, 0 replies; 4+ messages in thread
From: Ivo Alxneit @ 2002-10-15  2:04 UTC (permalink / raw)
  To: GSL-discuss

[-- Attachment #1: Type: TEXT/plain, Size: 1777 bytes --]

i have a wired problem. independently of wether i declare val as float or as double
i get the warning below for the following code:

#include <stdio.h>
#include <gsl/gsl_matrix_float.h>

void read_as_int(gsl_matrix_float *m, size_t n1, size_t n2)
{
	int c1, c2;
	double val;  /* or float val */
	size_t i, j;
	
	for(i=0; i< n1; i++) {
		for(j=0; j<n2; j++) {
			c1=fgetc(stdin);
			c2=fgetc(stdin);
			val=c1 + 256.0*c2;
			gsl_matrix_float_set(m, i, j, val);
		}
	}
}


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
rm -f lav2pnm
gcc -o lav2pnm -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     -L/usr/X11R6/lib lav2pnm.o      read_as_int.o      write_pgm.o      
 write_ppm.o      HSV_to_RGB.o      help.o      -lgsl -lgslcblas -lm 

what am i doing wrong here?
-- 
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 #2: Type: APPLICATION/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <E181NdC-00048U-00@ultra16.uk2net.com>]

end of thread, other threads:[~2002-10-20 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-15  2:04 strange warning in gsl_matrix_float_set Ivo Alxneit
     [not found] <E181NdC-00048U-00@ultra16.uk2net.com>
2002-10-15 15:06 ` Brian Gough
2002-10-17 23:16   ` Ivo Alxneit
     [not found]   ` <E182QR9-0005gW-00@ultra16.uk2net.com>
2002-10-20  6:06     ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).