Hi folks, gcc is emitting filetools.cpp: In function 'void lyx::support::fileUnlock(int, const char*)': filetools.cpp:1084:31: warning: ignoring return value of 'int lockf(int, int, __off_t)', declared with attribute warn_unused_result [-Wunused-result]
Is it worth to apply this patch to get rid of it? (2.2 stuff only). http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 Pavel
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 0012481..c46c29e 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1081,7 +1081,8 @@ void fileUnlock(int fd, const char * /* lock_file*/) { #if defined(HAVE_LOCKF) if ( fd >= 0) { - (void) lockf(fd, F_ULOCK, 0); + int dummy __attribute__((unused)); + dummy = lockf(fd, F_ULOCK, 0); close(fd); } #endif