avoid build warnings when building w/o concurrent-output

This commit is contained in:
Joey Hess 2016-09-06 14:35:24 -04:00
parent 867fd50637
commit 03b031554f
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 9 additions and 3 deletions

View file

@ -32,10 +32,12 @@ import GHC.IO.Encoding
- instead.
-}
concurrentMessage :: OutputType -> Bool -> String -> Annex () -> Annex ()
concurrentMessage o iserror msg fallback
#ifdef WITH_CONCURRENTOUTPUT
concurrentMessage o iserror msg fallback
| concurrentOutputEnabled o =
go =<< consoleRegion <$> Annex.getState Annex.output
#else
concurrentMessage _o _iserror _msg fallback
#endif
| otherwise = fallback
#ifdef WITH_CONCURRENTOUTPUT
@ -67,8 +69,8 @@ concurrentMessage o iserror msg fallback
- complete.
-}
inOwnConsoleRegion :: OutputType -> Annex a -> Annex a
inOwnConsoleRegion o a
#ifdef WITH_CONCURRENTOUTPUT
inOwnConsoleRegion o a
| concurrentOutputEnabled o = do
r <- mkregion
setregion (Just r)
@ -82,6 +84,8 @@ inOwnConsoleRegion o a
Right ret -> do
rmregion r
return ret
#else
inOwnConsoleRegion _o a
#endif
| otherwise = a
#ifdef WITH_CONCURRENTOUTPUT