Skip to content

Commit

Permalink
fix or suppress some warnings in dune dev build mode
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm authored and jeremiedimino committed Jan 15, 2019
1 parent 5f3eb31 commit 3212401
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/lib/uTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* This file is a part of utop.
*)

[@@@warning "-27"]

open CamomileLibraryDefault.Camomile
open Lwt_react
open LTerm_text
Expand Down
2 changes: 2 additions & 0 deletions src/lib/uTop_complete.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* This file is a part of utop.
*)

[@@@warning "-9-27-32"]

open Types
open LTerm_read_line
open UTop_token
Expand Down
2 changes: 1 addition & 1 deletion src/lib/uTop_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/lib/uTop_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/lib/uTop_styles.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 ->
Expand Down

0 comments on commit 3212401

Please sign in to comment.