summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-29 17:25:59 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-29 17:30:20 -0400
commite79780c0cac64c7b74754e47fc066aa0fc104345 (patch)
tree1baa2628f02698a883f8d0bfc8d362307cfa1d11
parentdaa420a9f299c331b24488d133d068ddc451b9aa (diff)
fixed all remaining build warnings on Windows
-rw-r--r--Annex/Init.hs6
-rw-r--r--Annex/Ssh.hs2
-rw-r--r--Assistant/Install.hs2
-rw-r--r--Assistant/Threads/NetWatcher.hs2
-rw-r--r--Assistant/Threads/SanityChecker.hs4
-rw-r--r--Remote/Git.hs2
-rw-r--r--Test.hs3
-rw-r--r--Utility/Daemon.hs2
-rw-r--r--Utility/DirWatcher/Win32Notify.hs4
-rw-r--r--Utility/InodeCache.hs6
-rw-r--r--Utility/UserInfo.hs4
11 files changed, 22 insertions, 15 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index dae7ccc1c..b335d10d3 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -32,14 +32,14 @@ import Config
import Annex.Direct
import Annex.Content.Direct
import Annex.Environment
-import Annex.Perms
import Backend
+import Annex.Hook
+import Upgrade
#ifndef mingw32_HOST_OS
import Utility.UserInfo
import Utility.FileMode
+import Annex.Perms
#endif
-import Annex.Hook
-import Upgrade
genDescription :: Maybe String -> Annex String
genDescription (Just d) = return d
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 3b7bd7d69..15b169862 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -35,9 +35,9 @@ import Config.Files
import Utility.Env
import Types.CleanupActions
import Annex.Index (addGitEnv)
-import Utility.LockFile
#ifndef mingw32_HOST_OS
import Annex.Perms
+import Utility.LockFile
#endif
{- Generates parameters to ssh to a given host (or user@host) on a given
diff --git a/Assistant/Install.hs b/Assistant/Install.hs
index 2e57bd38a..e2d52692e 100644
--- a/Assistant/Install.hs
+++ b/Assistant/Install.hs
@@ -22,7 +22,9 @@ import Utility.SshConfig
import Utility.OSX
#else
import Utility.FreeDesktop
+#ifdef linux_HOST_OS
import Utility.UserInfo
+#endif
import Assistant.Install.Menu
#endif
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs
index 58a83fe96..6a2515237 100644
--- a/Assistant/Threads/NetWatcher.hs
+++ b/Assistant/Threads/NetWatcher.hs
@@ -18,11 +18,11 @@ import Assistant.DaemonStatus
import Utility.NotificationBroadcaster
#if WITH_DBUS
+import Assistant.RemoteControl
import Utility.DBus
import DBus.Client
import DBus
import Assistant.NetMessager
-import Assistant.RemoteControl
#else
#ifdef linux_HOST_OS
#warning Building without dbus support; will poll for network connection changes
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index 9fd963a69..26c6ebba5 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -40,15 +40,15 @@ import Assistant.Unused
import Logs.Unused
import Logs.Transfer
import Config.Files
-import Utility.DiskFree
+import Types.Key (keyBackendName)
import qualified Annex
#ifdef WITH_WEBAPP
import Assistant.WebApp.Types
#endif
#ifndef mingw32_HOST_OS
import Utility.LogFile
+import Utility.DiskFree
#endif
-import Types.Key (keyBackendName)
import Data.Time.Clock.POSIX
import qualified Data.Text as T
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 04823949c..17b44fa6e 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -358,7 +358,9 @@ copyFromRemote' r key file dest
| not $ Git.repoIsUrl (repo r) = guardUsable (repo r) (return False) $ do
params <- Ssh.rsyncParams r Download
u <- getUUID
+#ifndef mingw32_HOST_OS
hardlink <- annexHardLink <$> Annex.getGitConfig
+#endif
-- run copy from perspective of remote
onLocal r $ do
ensureInitialized
diff --git a/Test.hs b/Test.hs
index dd7a45f47..43de251b7 100644
--- a/Test.hs
+++ b/Test.hs
@@ -116,13 +116,12 @@ main ps = do
#if MIN_VERSION_optparse_applicative(0,10,0)
case execParserPure pprefs pinfo args of
(Options.Applicative.Failure failure) -> do
- let (msg, _exit) = renderFailure failure progdesc
+ let (msg, _exit) = renderFailure failure "git-annex test"
error msg
v -> handleParseResult v
#else
handleParseResult $ execParserPure pprefs pinfo args
#endif
- progdesc = "git-annex test"
ingredients :: [Ingredient]
ingredients =
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 0615149e5..d1f539e98 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -21,8 +21,6 @@ import Utility.LockFile
#ifndef mingw32_HOST_OS
import System.Posix
import Control.Concurrent.Async
-#else
-import System.Exit
#endif
#ifndef mingw32_HOST_OS
diff --git a/Utility/DirWatcher/Win32Notify.hs b/Utility/DirWatcher/Win32Notify.hs
index ef4f385c5..54f34935a 100644
--- a/Utility/DirWatcher/Win32Notify.hs
+++ b/Utility/DirWatcher/Win32Notify.hs
@@ -17,10 +17,10 @@ watchDir :: FilePath -> (FilePath -> Bool) -> Bool -> WatchHooks -> IO WatchMana
watchDir dir ignored scanevents hooks = do
scan dir
wm <- initWatchManager
- void $ watchDirectory wm dir True [Create, Delete, Modify, Move] handle
+ void $ watchDirectory wm dir True [Create, Delete, Modify, Move] dispatch
return wm
where
- handle evt
+ dispatch evt
| ignoredPath ignored (filePath evt) = noop
| otherwise = case evt of
(Deleted _ _)
diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs
index 328b77595..8a182449b 100644
--- a/Utility/InodeCache.hs
+++ b/Utility/InodeCache.hs
@@ -7,6 +7,7 @@
-}
{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
module Utility.InodeCache (
InodeCache,
@@ -182,7 +183,10 @@ checkSentinalFile s = do
SentinalStatus (not unchanged) tsdelta
where
#ifdef mingw32_HOST_OS
- unchanged = oldinode == newinode && oldsize == newsize
+ -- Since mtime can appear to change when the time zone is
+ -- changed in windows, we cannot look at the mtime for the
+ -- sentinal file.
+ unchanged = oldinode == newinode && oldsize == newsize && (newmtime == newmtime)
tsdelta = TSDelta $ do
-- Run when generating an InodeCache,
-- to get the current delta.
diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs
index 1a557c9a5..c82f04079 100644
--- a/Utility/UserInfo.hs
+++ b/Utility/UserInfo.hs
@@ -13,8 +13,10 @@ module Utility.UserInfo (
myUserGecos,
) where
-import Control.Applicative
import System.PosixCompat
+#ifndef mingw32_HOST_OS
+import Control.Applicative
+#endif
import Utility.Env