Path: utzoo!attcan!uunet!stretch.cs.mun.ca!leif!haggas From: haggas@kean.ucs.mun.ca Newsgroups: comp.lang.c Subject: Unresolved warning - QuickC V1.1 Message-ID: <147848@kean.ucs.mun.ca> Date: 22 Oct 90 12:12:15 GMT Organization: Memorial University. St.John's Nfld, Canada Lines: 33 What is the cause of the warning in the indicated line? /* sysread.c */ /* reads and displays file - uses system I/O */ #include /* needed for oflags in open() */ #include /* exit() */ #include /* putch() */ #include /* read() */ #define BUFFSIZE 512 char buff[BUFFSIZE]; /* buffer */ void main(int, char *[]); /* prototype for main() */ void main(argc,argv) int argc; char *argv[]; { int inhandle, bytes, j; if( argc != 2 ) /* check arguments */ { printf("Format: C>sysread file.xxx"); exit(1); } /* open file */ /* The following line has the C4051 warning - Data Conversion. Why? */ if( (inhandle = open(argv[1], O_RDONLY | O_BINARY)) < 0 ) { printf("Can't open file %s.", argv[1]); exit(1); } /* read one buffer */ while( (bytes = read(inhandle, buff, BUFFSIZE)) > 0 ) for(j=0; j