Quiet compiler warning for Firewall.format{Input,Output}Rules
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 29 Mar 2014 01:32:45 +0000 (21:32 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 29 Mar 2014 01:32:45 +0000 (21:32 -0400)
I think the type needs rethinking to make the case exhaustive

src/plugins/firewall.sml

index d58c251..daa4b11 100644 (file)
@@ -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 }