src/top.ml: Don't depend on exact value of Failure argument.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 20 Aug 2019 13:31:34 +0000 (14:31 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 20 Aug 2019 13:31:34 +0000 (14:31 +0100)
File "top.ml", line 423, characters 14-31:
423 |       Failure "float_of_string" ->
                    ^^^^^^^^^^^^^^^^^
Warning 52: Code should not depend on the actual values of
this constructor's arguments. They are only for information
and may change in future versions. (See manual section 9.5)

src/top.ml

index d4f7697..c38239c 100644 (file)
@@ -420,7 +420,7 @@ and change_delay () =
        delay := int_of_float (newdelay *. 1000.); false
       )
     with
        delay := int_of_float (newdelay *. 1000.); false
       )
     with
-      Failure "float_of_string" ->
+      Failure _ ->
        print_msg (s_"Not a valid number"); true in
   refresh ();
   sleep (if error then 2 else 1)
        print_msg (s_"Not a valid number"); true in
   refresh ();
   sleep (if error then 2 else 1)