Commit c939b58e authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix unused-do-binds for ghc 6.12

GHC 6.12 has some new warnings, which are valid in most cases except
(IMHO) printf usage.
parent 0903280b
......@@ -359,7 +359,7 @@ parseOpts argv progname options =
printf "%s %s\ncompiled with %s %s\nrunning on %s %s\n"
progname Version.version
compilerName (Data.Version.showVersion compilerVersion)
os arch
os arch :: IO ()
exitWith ExitSuccess
return (po, args)
(_, _, errs) -> do
......
......@@ -124,6 +124,7 @@ loadExternalData opts = do
Ok x -> return x
Bad s -> do
hPrintf stderr "Error: failed to load data. Details:\n%s\n" s
:: IO ()
exitWith $ ExitFailure 1
)
let (fix_msgs, fixed_nl) = Loader.checkData loaded_nl il
......
......@@ -206,7 +206,7 @@ main = do
when (length offline_wrong > 0) $ do
hPrintf stderr "Wrong node name(s) set as offline: %s\n"
(commaJoin offline_wrong)
(commaJoin offline_wrong) :: IO ()
exitWith $ ExitFailure 1
let nm = Container.map (\n -> if elem (Node.idx n) offline_indices
......@@ -328,7 +328,7 @@ main = do
when (verbose > 3) $
do
printf "Original: mem=%d disk=%d\n"
(Cluster.csFmem ini_cs) (Cluster.csFdsk ini_cs)
(Cluster.csFmem ini_cs) (Cluster.csFdsk ini_cs) :: IO ()
printf "Final: mem=%d disk=%d\n"
(Cluster.csFmem fin_cs) (Cluster.csFdsk fin_cs)
when oneline $
......
......@@ -145,7 +145,7 @@ writeData _ name _ (Bad err) =
printf "\nError for %s: failed to load data. Details:\n%s\n" name err
writeData nlen name opts (Ok (nl, il, adata)) = do
printf "%-*s " nlen name
printf "%-*s " nlen name :: IO ()
hFlush stdout
let shownodes = optShowNodes opts
odir = optOutPath opts
......
......@@ -173,7 +173,7 @@ printResults fin_nl num_instances allocs sreason = do
do
hPrintf stderr "ERROR: internal inconsistency, allocated (%d)\
\ != counted (%d)\n" (num_instances + allocs)
(Cluster.csNinst fin_stats)
(Cluster.csNinst fin_stats) :: IO ()
exitWith $ ExitFailure 1
printKeys $ printStats PFinal fin_stats
......@@ -244,11 +244,12 @@ main = do
when (length offline_wrong > 0) $ do
hPrintf stderr "Error: Wrong node name(s) set as offline: %s\n"
(commaJoin offline_wrong)
(commaJoin offline_wrong) :: IO ()
exitWith $ ExitFailure 1
when (req_nodes /= 1 && req_nodes /= 2) $ do
hPrintf stderr "Error: Invalid required nodes (%d)\n" req_nodes
hPrintf stderr "Error: Invalid required nodes (%d)\n"
req_nodes :: IO ()
exitWith $ ExitFailure 1
let nm = Container.map (\n -> if elem (Node.idx n) offline_indices
......@@ -288,7 +289,7 @@ main = do
(rspecCpu spx) "ADMIN_down" [] (-1) (-1)
exitifbad val = (case val of
Bad s -> do
hPrintf stderr "Failure: %s\n" s
hPrintf stderr "Failure: %s\n" s :: IO ()
exitWith $ ExitFailure 1
Ok x -> return x)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment