From: Clinton Ebadi Date: Sat, 29 Mar 2014 01:32:45 +0000 (-0400) Subject: Quiet compiler warning for Firewall.format{Input,Output}Rules X-Git-Tag: release_20140328~1 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/f3b84aff36a896635953a771ac1ab7da085a8f52?hp=167cffff3b3a976d4bf454808d3054fdb323b1a1 Quiet compiler warning for Firewall.format{Input,Output}Rules I think the type needs rethinking to make the case exhaustive --- diff --git a/src/plugins/firewall.sml b/src/plugins/firewall.sml index d58c251..daa4b11 100644 --- a/src/plugins/firewall.sml +++ b/src/plugins/firewall.sml @@ -85,10 +85,12 @@ fun formatHosts hosts = "(" ^ String.concatWith " " hosts ^ ")" fun formatOutputRule (Client (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of [] => "" | _ => " daddr " ^ formatHosts hosts) ^ " ACCEPT;" + | formatOutputRule _ = "" fun formatInputRule (Server (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of [] => "" | _ => " saddr " ^ formatHosts hosts) ^ " ACCEPT;" + | formatInputRule _ = "" type ferm_lines = { input_rules : (string list) DataStructures.StringMap.map, output_rules : (string list) DataStructures.StringMap.map }