summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-29 16:09:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-29 16:09:07 -0400
commit713388bf4d65552d5b2e8b070fbb8879b4264efd (patch)
tree363375a5c9a5593d1ff4f5f1f94056e155db8367
parentdc88c9706d63bb056b01d97509afcec98c0c2f3c (diff)
avoid some warnings when built w/o dbus
-rw-r--r--Assistant/Threads/MountWatcher.hs4
-rw-r--r--Assistant/Threads/NetWatcher.hs7
2 files changed, 5 insertions, 6 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs
index e52dc9093..79fcce08c 100644
--- a/Assistant/Threads/MountWatcher.hs
+++ b/Assistant/Threads/MountWatcher.hs
@@ -22,8 +22,6 @@ import Utility.Mounts
import Remote.List
import qualified Types.Remote as Remote
-import Control.Concurrent
-import qualified Control.Exception as E
import qualified Data.Set as S
#if WITH_DBUS
@@ -31,6 +29,8 @@ import Utility.DBus
import DBus.Client
import DBus
import Data.Word (Word32)
+import Control.Concurrent
+import qualified Control.Exception as E
#else
#warning Building without dbus support; will use mtab polling
#endif
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs
index e9af2a53b..a8daa9435 100644
--- a/Assistant/Threads/NetWatcher.hs
+++ b/Assistant/Threads/NetWatcher.hs
@@ -19,13 +19,12 @@ import Utility.ThreadScheduler
import Remote.List
import qualified Types.Remote as Remote
-import qualified Control.Exception as E
-
#if WITH_DBUS
import Utility.DBus
import DBus.Client
import DBus
import Data.Word (Word32)
+import qualified Control.Exception as E
#else
#warning Building without dbus support; will poll for network connection changes
#endif
@@ -34,11 +33,11 @@ thisThread :: ThreadName
thisThread = "NetWatcher"
netWatcherThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> NamedThread
-netWatcherThread st dstatus scanremotes = thread $
#if WITH_DBUS
+netWatcherThread st dstatus scanremotes = thread $
dbusThread st dstatus scanremotes
#else
- noop
+netWatcherThread _ _ _ = thread noop
#endif
where
thread = NamedThread thisThread