From 3212401775140d5564d24d9e71cfbae0dddcbcda Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 14 Jan 2019 18:57:08 +0000 Subject: [PATCH] fix or suppress some warnings in dune dev build mode --- src/lib/uTop.ml | 2 ++ src/lib/uTop_complete.ml | 2 ++ src/lib/uTop_lexer.mll | 2 +- src/lib/uTop_main.ml | 2 ++ src/lib/uTop_styles.ml | 6 +++--- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/uTop.ml b/src/lib/uTop.ml index 55d89d19..f454c75c 100644 --- a/src/lib/uTop.ml +++ b/src/lib/uTop.ml @@ -7,6 +7,8 @@ * This file is a part of utop. *) +[@@@warning "-27"] + open CamomileLibraryDefault.Camomile open Lwt_react open LTerm_text diff --git a/src/lib/uTop_complete.ml b/src/lib/uTop_complete.ml index 6ffe58ce..d28d41c7 100644 --- a/src/lib/uTop_complete.ml +++ b/src/lib/uTop_complete.ml @@ -7,6 +7,8 @@ * This file is a part of utop. *) +[@@@warning "-9-27-32"] + open Types open LTerm_read_line open UTop_token diff --git a/src/lib/uTop_lexer.mll b/src/lib/uTop_lexer.mll index 67062016..579276b4 100644 --- a/src/lib/uTop_lexer.mll +++ b/src/lib/uTop_lexer.mll @@ -34,7 +34,7 @@ ofs2 = ofs2; } - let merge_loc l1 l2 = { + let _merge_loc l1 l2 = { idx1 = l1.idx1; idx2 = l2.idx2; ofs1 = l1.ofs1; diff --git a/src/lib/uTop_main.ml b/src/lib/uTop_main.ml index 8318bd85..da63a22a 100644 --- a/src/lib/uTop_main.ml +++ b/src/lib/uTop_main.ml @@ -7,6 +7,8 @@ * This file is a part of utop. *) +[@@@warning "-7-9-27-32-33"] + open CamomileLibraryDefault.Camomile open Lwt_react open LTerm_dlist diff --git a/src/lib/uTop_styles.ml b/src/lib/uTop_styles.ml index 44f045ce..96a72f08 100644 --- a/src/lib/uTop_styles.ml +++ b/src/lib/uTop_styles.ml @@ -94,7 +94,7 @@ let load () = (function | Unix.Unix_error(Unix.ENOENT, _, _) -> return () - | Unix.Unix_error (error, func, arg) -> + | Unix.Unix_error (error, func, _arg) -> Lwt_log.error_f "cannot load styles from %S: %s: %s" fn func (Unix.error_message error) | exn -> Lwt.fail exn) @@ -130,11 +130,11 @@ let rec stylise_rec stylise tokens = | (Uident id, loc) :: tokens when String_set.mem id !UTop.keywords -> stylise loc styles.style_keyword; stylise_rec stylise tokens - | (Uident id, loc1) :: (Symbol ".", loc2) :: tokens -> + | (Uident _id, loc1) :: (Symbol ".", loc2) :: tokens -> stylise loc1 styles.style_module; stylise loc2 styles.style_symbol; stylise_rec stylise tokens - | (Uident id, loc) :: tokens -> + | (Uident _id, loc) :: tokens -> stylise loc styles.style_ident; stylise_rec stylise tokens | (Constant _, loc) :: tokens ->