]> diplodocus.org Git - nmh/commitdiff
lock_file.c: Compiler warns of unused isnewlock if HAVE_LIBLOCKFILE.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 18 Aug 2017 13:29:59 +0000 (14:29 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 18 Aug 2017 13:29:59 +0000 (14:29 +0100)
sbr/lock_file.c

index c3dbbd9..8b0a121 100644 (file)
@@ -628,7 +628,9 @@ lockname (const char *file, struct lockinfo *li, int isnewlock)
 
     snprintf (bp, sizeof(li->curlock) - bplen, "%s.lock", cp);
 
-#if !defined(HAVE_LIBLOCKFILE)
+#if defined(HAVE_LIBLOCKFILE)
+    NMH_UNUSED(isnewlock);
+#else
     /*
      * If this is for a new lock, create a name for
      * the temporary lock file for lockit()