From 0f8a2d2860c86c859064546876b2c99992dfd50d Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Thu, 27 Mar 2014 01:10:59 -0700 Subject: [PATCH] Squash gcc warning. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg183142.html --- src/support/filetools.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 0012481681..92aeaf7fb4 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1080,8 +1080,9 @@ int fileLock(const char * lock_file) void fileUnlock(int fd, const char * /* lock_file*/) { #if defined(HAVE_LOCKF) - if ( fd >= 0) { - (void) lockf(fd, F_ULOCK, 0); + if (fd >= 0) { + if (lockf(fd, F_ULOCK, 0)) + LYXERR0("Can't unlock the file."); close(fd); } #endif