Hi,
When building sqlite 3.6.10 amalgamation, I get
a warning message saying:
attention : ignoring return value of ‘write’, declared with attribute
warn_unused_result
This is on a small piece of code related to ticket
#3260, according to the source documentation. (See
the code below.)
I know this is not a problem, but I would like to
remove this warning since it's not important for
the rest of the code. What could I do?
Thanks,
Maurício
/* On OS X on an msdos filesystem, the inode number is reported
** incorrectly for zero-size files. See ticket #3260. To work
** around this problem (we consider it a bug in OS X, not SQLite)
** we always increase the file size to 1 by writing a single byte
** prior to accessing the inode number. The one byte written is
** an ASCII 'S' character which also happens to be the first byte
** in the header of every SQLite database. In this way, if there
** is a race condition such that another thread has already populated
** the first page of the database, no damage is done.
*/
if( statbuf.st_size==0 ){
write(fd, "S", 1);
rc = fstat(fd, &statbuf);
if( rc!=0 ){
pFile->lastErrno = errno;
return SQLITE_IOERR;
}
}
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users