Skip to content

Commit b8f78e9

Browse files
committed
fix warnings for docs
1 parent 15f9e53 commit b8f78e9

File tree

8 files changed

+42
-32
lines changed

8 files changed

+42
-32
lines changed

jscomp/runtime/caml_format.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ let caml_int64_format fmt x =
402402
begin
403403
let y = Caml_int64.discard_sign x in
404404
(* 2 ^ 63 + y `div_mod` 8 *)
405-
let quotient_l = 1152921504606846976L (**)
405+
let quotient_l = 1152921504606846976L
406406
(* {lo = 0n; hi = 268435456n } *) (* 2 ^ 31 / 8 *)
407407
in
408408

jscomp/runtime/caml_module.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
* You should have received a copy of the GNU Lesser General Public License
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24-
2524
(** This module replaced camlinternalMod completely.
2625
Note we can replace {!CamlinternalMod} completely, but it is not replaced
2726
due to we believe this is an even low level dependency
2827
*)
28+
2929
[@@@warning "-37"] (* `Function` may be used in runtime *)
3030

3131
type shape =

jscomp/runtime/caml_oo.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ let caml_get_public_method
5757
let offs = caml_methods_cache.(cacheid) in
5858
if (Caml_obj_extern.magic meths.(offs) : int) = tag then meths.(offs - 1)
5959
else
60-
(** TODO: binary search *)
60+
(* TODO: binary search *)
6161
let rec aux (i : int) : int =
6262
if i < 3 then assert false
6363
else if (Caml_obj_extern.magic meths.(i) : int) = tag then

jscomp/runtime/curry.ml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
* along with this program; if not, write to the Free Software
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2525

26-
(** Generated by scripts/curry_gen.ml *)
26+
(* Generated by scripts/curry_gen.ml *)
2727
external function_length : 'a -> int = "#function_length"
2828
external apply_args : ('a -> 'b) -> _ array -> 'b = "#apply"
2929
external sub : 'a array -> int -> int -> 'a array = "caml_array_sub"
3030

31-
(** Public *)
31+
(* Public *)
3232
let rec app f args =
3333
let init_arity = function_length f in
3434
let arity = if init_arity = 0 then 1 else init_arity in (* arity fixing *)
3535
let len = Caml_array_extern.length args in
3636
let d = arity - len in
3737
if d = 0 then
38-
apply_args f args (**f.apply (null,args) *)
38+
apply_args f args (* f.apply (null,args) *)
3939
else if d < 0 then
40-
(** TODO: could avoid copy by tracking the index *)
40+
(* TODO: could avoid copy by tracking the index *)
4141
app (Obj.magic (apply_args f (sub args 0 arity)))
4242
(sub args arity (-d))
4343
else
@@ -73,12 +73,13 @@ let curry_1 o a0 arity =
7373
| 7 -> apply7 (Obj.magic o) a0
7474
| _ -> Obj.magic (app o [|a0|])
7575

76-
(** Public *)
76+
(* Public *)
7777
let _1 o a0 =
7878
let arity = function_length o in
7979
if arity = 1 then apply1 o a0
8080
else curry_1 o a0 arity
81-
(** Public *)
81+
82+
(* Public *)
8283
let __1 o =
8384
let arity = function_length o in
8485
if arity = 1 then o
@@ -97,12 +98,13 @@ let curry_2 o a0 a1 arity =
9798
| 7 -> apply7 (Obj.magic o) a0 a1
9899
| _ -> Obj.magic (app o [|a0;a1|])
99100

100-
(** Public *)
101+
(* Public *)
101102
let _2 o a0 a1 =
102103
let arity = function_length o in
103104
if arity = 2 then apply2 o a0 a1
104105
else curry_2 o a0 a1 arity
105-
(** Public *)
106+
107+
(* Public *)
106108
let __2 o =
107109
let arity = function_length o in
108110
if arity = 2 then o
@@ -121,12 +123,13 @@ let curry_3 o a0 a1 a2 arity =
121123
| 7 -> apply7 (Obj.magic o) a0 a1 a2
122124
| _ -> Obj.magic (app o [|a0;a1;a2|])
123125

124-
(** Public *)
126+
(* Public *)
125127
let _3 o a0 a1 a2 =
126128
let arity = function_length o in
127129
if arity = 3 then apply3 o a0 a1 a2
128130
else curry_3 o a0 a1 a2 arity
129-
(** Public *)
131+
132+
(* Public *)
130133
let __3 o =
131134
let arity = function_length o in
132135
if arity = 3 then o
@@ -145,12 +148,13 @@ let curry_4 o a0 a1 a2 a3 arity =
145148
| 7 -> apply7 (Obj.magic o) a0 a1 a2 a3
146149
| _ -> Obj.magic (app o [|a0;a1;a2;a3|])
147150

148-
(** Public *)
151+
(* Public *)
149152
let _4 o a0 a1 a2 a3 =
150153
let arity = function_length o in
151154
if arity = 4 then apply4 o a0 a1 a2 a3
152155
else curry_4 o a0 a1 a2 a3 arity
153-
(** Public *)
156+
157+
(* Public *)
154158
let __4 o =
155159
let arity = function_length o in
156160
if arity = 4 then o
@@ -169,12 +173,13 @@ let curry_5 o a0 a1 a2 a3 a4 arity =
169173
| 7 -> apply7 (Obj.magic o) a0 a1 a2 a3 a4
170174
| _ -> Obj.magic (app o [|a0;a1;a2;a3;a4|])
171175

172-
(** Public *)
176+
(* Public *)
173177
let _5 o a0 a1 a2 a3 a4 =
174178
let arity = function_length o in
175179
if arity = 5 then apply5 o a0 a1 a2 a3 a4
176180
else curry_5 o a0 a1 a2 a3 a4 arity
177-
(** Public *)
181+
182+
(* Public *)
178183
let __5 o =
179184
let arity = function_length o in
180185
if arity = 5 then o
@@ -193,12 +198,13 @@ let curry_6 o a0 a1 a2 a3 a4 a5 arity =
193198
| 7 -> apply7 (Obj.magic o) a0 a1 a2 a3 a4 a5
194199
| _ -> Obj.magic (app o [|a0;a1;a2;a3;a4;a5|])
195200

196-
(** Public *)
201+
(* Public *)
197202
let _6 o a0 a1 a2 a3 a4 a5 =
198203
let arity = function_length o in
199204
if arity = 6 then apply6 o a0 a1 a2 a3 a4 a5
200205
else curry_6 o a0 a1 a2 a3 a4 a5 arity
201-
(** Public *)
206+
207+
(* Public *)
202208
let __6 o =
203209
let arity = function_length o in
204210
if arity = 6 then o
@@ -217,12 +223,13 @@ let curry_7 o a0 a1 a2 a3 a4 a5 a6 arity =
217223
| 7 -> apply7 (Obj.magic o) a0 a1 a2 a3 a4 a5 a6
218224
| _ -> Obj.magic (app o [|a0;a1;a2;a3;a4;a5;a6|])
219225

220-
(** Public *)
226+
(* Public *)
221227
let _7 o a0 a1 a2 a3 a4 a5 a6 =
222228
let arity = function_length o in
223229
if arity = 7 then apply7 o a0 a1 a2 a3 a4 a5 a6
224230
else curry_7 o a0 a1 a2 a3 a4 a5 a6 arity
225-
(** Public *)
231+
232+
(* Public *)
226233
let __7 o =
227234
let arity = function_length o in
228235
if arity = 7 then o
@@ -241,12 +248,13 @@ let curry_8 o a0 a1 a2 a3 a4 a5 a6 a7 arity =
241248
| 7 -> app (apply7 (Obj.magic o) a0 a1 a2 a3 a4 a5 a6) [|a7|]
242249
| _ -> Obj.magic (app o [|a0;a1;a2;a3;a4;a5;a6;a7|])
243250

244-
(** Public *)
251+
(* Public *)
245252
let _8 o a0 a1 a2 a3 a4 a5 a6 a7 =
246253
let arity = function_length o in
247254
if arity = 8 then apply8 o a0 a1 a2 a3 a4 a5 a6 a7
248255
else curry_8 o a0 a1 a2 a3 a4 a5 a6 a7 arity
249-
(** Public *)
256+
257+
(* Public *)
250258
let __8 o =
251259
let arity = function_length o in
252260
if arity = 8 then o

jscomp/runtime/js.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type +'a t
5252
]}
5353
*)
5454

55+
[@@@warning "-49"]
5556
(* internal types for FFI, these types are not used by normal users *)
5657

5758
(**/**)

jscomp/runtime/release.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
bsc = ../lib/bsc.exe
3-
bsc_no_open_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -nopervasives -unsafe -warn-error A -w -40-49-103 -bin-annot
3+
bsc_no_open_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -nopervasives -unsafe -w +50 -warn-error A -bin-annot
44
bsc_flags = $bsc_no_open_flags -open Bs_stdlib_mini
55

66
rule cc

scripts/curry_gen.ml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ let prelude ={|
3535
* along with this program; if not, write to the Free Software
3636
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
3737

38-
(** Generated by scripts/curry_gen.ml *)
38+
(* Generated by scripts/curry_gen.ml *)
3939
external function_length : 'a -> int = "#function_length"
4040
external apply_args : ('a -> 'b) -> _ array -> 'b = "#apply"
4141
external sub : 'a array -> int -> int -> 'a array = "caml_array_sub"
4242

43-
(** Public *)
43+
(* Public *)
4444
let rec app f args =
4545
let init_arity = function_length f in
4646
let arity = if init_arity = 0 then 1 else init_arity in (* arity fixing *)
4747
let len = Caml_array_extern.length args in
4848
let d = arity - len in
4949
if d = 0 then
50-
apply_args f args (**f.apply (null,args) *)
50+
apply_args f args (* f.apply (null,args) *)
5151
else if d < 0 then
52-
(** TODO: could avoid copy by tracking the index *)
52+
(* TODO: could avoid copy by tracking the index *)
5353
app (Obj.magic (apply_args f (sub args 0 arity)))
5454
(sub args arity (-d))
5555
else
@@ -114,12 +114,13 @@ let curry_%d o %s arity =
114114
match arity with
115115
|%s
116116

117-
(** Public *)
117+
(* Public *)
118118
let _%d o %s =
119119
let arity = function_length o in
120120
if arity = %d then apply%d o %s
121121
else curry_%d o %s arity
122-
(** Public *)
122+
123+
(* Public *)
123124
let __%d o =
124125
let arity = function_length o in
125126
if arity = %d then o

scripts/ninja.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ async function runtimeNinja(devmode = true) {
879879
: "release.ninja";
880880
var templateRuntimeRules = `
881881
${BSC_COMPILER}
882-
bsc_no_open_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -nopervasives -unsafe -warn-error A -w -40-49-103 -bin-annot
882+
bsc_no_open_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -nopervasives -unsafe -w +50 -warn-error A -bin-annot
883883
bsc_flags = $bsc_no_open_flags -open Bs_stdlib_mini
884884
${ruleCC(ninjaCwd)}
885885
${ninjaQuickBuidList([
@@ -1608,7 +1608,7 @@ function nativeNinja() {
16081608
var templateNative = `
16091609
subninja ${getPreprocessorFileName()}
16101610
rule optc
1611-
command = $ocamlopt -safe-string -I +compiler-libs -opaque ${includes} -g -w a-50+6-40-30-23 -warn-error +a -absname -c $in
1611+
command = $ocamlopt -safe-string -I +compiler-libs -opaque ${includes} -g -w a-50+6-40-30-23 -warn-error A -absname -c $in
16121612
description = $out : $in
16131613
rule archive
16141614
command = $ocamlopt -a $in -o $out

0 commit comments

Comments
 (0)