[quote]asdf.c:4041: warning: comparison between pointer and integer
asdf.c:4042: warning: comparison between pointer and integer[/quote]
and here is the code surrounding it...
Code: Select all
int savefile(filename,buffer,mode,offset,size)
char *filename, *mode;
void *buffer;
long offset;
unsigned int size;
{
int error = 0;
if ((fp = fopen(filename, mode)) == NULL) goto trouble;
if (offset != 0)
if (fseek(fp, offset, 0) != 0){ fclose(fp);goto trouble;}
if (fwrite(buffer, size, 1, fp) == NULL) {fclose(fp);goto trouble;}
if (fclose(fp) < NULL) goto trouble;
return 1;
trouble:
sprintf(answer,"ERROR saving %s [error=%d]",filename,error);
msg("\n", answer, "",0);
return 0;
}Code: Select all
if (fclose(fp) < NULL) goto trouble;
return 1;

