Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!samsung!know!theep!wildcat!steve From: steve@wildcat.UUCP (Steve Holland) Newsgroups: comp.sys.amiga.programmer Subject: Re: SAS C Bug?? Standard FILE command does not work!! Message-ID: Date: 29 Jan 91 23:18:38 GMT References: <1991Jan27.221835.1230@rodan.acs.syr.edu> Reply-To: wildcat!steve@alphalpha.com Lines: 17 >In article <1991Jan27.221835.1230@rodan.acs.syr.edu> goldberg@rodan.acs.syr.edu (Ross Goldberg) writes: >On SAS C, the first argument in fwrite or fread which is &grades or something >like that in this case gives a warning 88: argument type incorrect >[Grades is a structure] Yes this is a bug, but a very minor one. According to the ANSI definition in K&R, fread/fwrite's first argument should be a "void *". Lattice/SAS header files show it as a "char *". You can ignore the warnings, use (char *)Grades instead of just Grades, or fix the bug yourself by changing the Lattice/SAS header file to use a "void *" instead of a "char *". Since a pointer is a pointer, there is no effective difference and this should not affect the compiler in any other way. ----------->Steve Holland<----------- Internet: wildcat!steve@alfalfa.com | "To err is human, but to really foul USENET: ..bu!alphalpha!wildcat!steve | things up requires a computer."