avoid build warning
authorJoey Hess <joeyh@joeyh.name>
Thu, 30 Jan 2025 18:52:41 +0000 (14:52 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 30 Jan 2025 18:52:41 +0000 (14:52 -0400)
An odd one, it complained about security_attributes being defined but
not used, but it was used..

Utility/LockFile/Windows.hs

index 9f35ec1129bd35f09f106bceee15e4d34fe3645a..8e6c6d290522cb9ac342e8f1c0131d225c944f60 100644 (file)
@@ -70,13 +70,11 @@ openLock sharemode f = do
                Right h -> Just h
 #else
        h <- withTString (fromRawFilePath f') $ \c_f ->
-               c_CreateFile c_f gENERIC_READ sharemode security_attributes
+               c_CreateFile c_f gENERIC_READ sharemode (maybePtr Nothing)
                        oPEN_ALWAYS fILE_ATTRIBUTE_NORMAL (maybePtr Nothing)
        return $ if h == iNVALID_HANDLE_VALUE
                then Nothing
                else Just h
-  where
-       security_attributes = maybePtr Nothing
 #endif
 
 dropLock :: LockHandle -> IO ()