From 74a6e8ff60938aeb1e2aa437f160e3998ace8f09 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 29 Sep 2012 16:09:07 -0400 Subject: [PATCH] avoid some warnings when built w/o dbus --- Assistant/Threads/MountWatcher.hs | 4 ++-- Assistant/Threads/NetWatcher.hs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs index e52dc9093d..79fcce08cf 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 e9af2a53b4..a8daa94350 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