Skip to content

Commit

Permalink
Compile with warning 33, and remove unused opens.
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
frisch committed May 29, 2012
1 parent 13730bf commit 7f655f4
Show file tree
Hide file tree
Showing 33 changed files with 8 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include stdlib/StdlibModules


CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink
COMPFLAGS=-strict-sequence -warn-error A $(INCLUDES) COMPFLAGS=-strict-sequence -w +33 -warn-error A $(INCLUDES)
LINKFLAGS= LINKFLAGS=


CAMLYACC=boot/ocamlyacc CAMLYACC=boot/ocamlyacc
Expand Down
2 changes: 0 additions & 2 deletions bytecomp/bytelink.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@


(* Link a set of .cmo files and produce a bytecode executable. *) (* Link a set of .cmo files and produce a bytecode executable. *)


open Sys
open Misc open Misc
open Config open Config
open Instruct
open Cmo_format open Cmo_format


type error = type error =
Expand Down
1 change: 0 additions & 1 deletion bytecomp/translclass.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


(* $Id$ *) (* $Id$ *)


open Misc
open Asttypes open Asttypes
open Types open Types
open Typedtree open Typedtree
Expand Down
1 change: 0 additions & 1 deletion bytecomp/translmod.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ open Longident
open Path open Path
open Types open Types
open Typedtree open Typedtree
open Primitive
open Lambda open Lambda
open Translobj open Translobj
open Translcore open Translcore
Expand Down
3 changes: 0 additions & 3 deletions bytecomp/typeopt.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@


(* Auxiliaries for type-based optimizations, e.g. array kinds *) (* Auxiliaries for type-based optimizations, e.g. array kinds *)


open Misc
open Asttypes
open Primitive
open Path open Path
open Types open Types
open Typedtree open Typedtree
Expand Down
1 change: 0 additions & 1 deletion driver/compile.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
open Misc open Misc
open Config open Config
open Format open Format
open Typedtree


(* Initialize the search path. (* Initialize the search path.
The current directory is always searched first, The current directory is always searched first,
Expand Down
2 changes: 1 addition & 1 deletion lex/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# The lexer generator # The lexer generator
CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot
CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib
COMPFLAGS=-warn-error A COMPFLAGS=-w +33 -warn-error A
CAMLYACC=../boot/ocamlyacc CAMLYACC=../boot/ocamlyacc
YACCFLAGS=-v YACCFLAGS=-v
CAMLLEX=../boot/ocamlrun ../boot/ocamllex CAMLLEX=../boot/ocamlrun ../boot/ocamllex
Expand Down
1 change: 0 additions & 1 deletion lex/main.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* The lexer generator. Command-line parsing. *) (* The lexer generator. Command-line parsing. *)


open Syntax open Syntax
open Lexgen


let ml_automata = ref false let ml_automata = ref false
let source_name = ref None let source_name = ref None
Expand Down
1 change: 0 additions & 1 deletion lex/output.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* Output the DFA tables and its entry points *) (* Output the DFA tables and its entry points *)


open Printf open Printf
open Syntax
open Lexgen open Lexgen
open Compact open Compact
open Common open Common
Expand Down
1 change: 0 additions & 1 deletion lex/outputbis.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* Output the DFA tables and its entry points *) (* Output the DFA tables and its entry points *)


open Printf open Printf
open Syntax
open Lexgen open Lexgen
open Common open Common


Expand Down
2 changes: 1 addition & 1 deletion otherlibs/Makefile.shared
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include $(ROOTDIR)/config/Makefile
# Compilation options # Compilation options
CC=$(BYTECC) CC=$(BYTECC)
CAMLRUN=$(ROOTDIR)/boot/ocamlrun CAMLRUN=$(ROOTDIR)/boot/ocamlrun
COMPFLAGS=-warn-error A -g $(EXTRACAMLFLAGS) COMPFLAGS=-w +33 -warn-error A -g $(EXTRACAMLFLAGS)
MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib


# Variables to be defined by individual libraries: # Variables to be defined by individual libraries:
Expand Down
2 changes: 1 addition & 1 deletion otherlibs/dynlink/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include ../../config/Makefile
CAMLC=../../boot/ocamlrun ../../ocamlc CAMLC=../../boot/ocamlrun ../../ocamlc
CAMLOPT=../../ocamlcompopt.sh CAMLOPT=../../ocamlcompopt.sh
INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp
COMPFLAGS=-warn-error A -I ../../stdlib $(INCLUDES) COMPFLAGS=-w +33 -warn-error A -I ../../stdlib $(INCLUDES)


OBJS=dynlinkaux.cmo dynlink.cmo OBJS=dynlinkaux.cmo dynlink.cmo


Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/compiler/lexer.mll
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
open StdLabels open StdLabels
open Lexing open Lexing
open Parser open Parser
open Support


exception Lexical_error of string exception Lexical_error of string
let current_line = ref 1 let current_line = ref 1
Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/compiler/maincompile.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
(* $Id$ *) (* $Id$ *)


open StdLabels open StdLabels
open Support
open Tables open Tables
open Printer open Printer
open Compile open Compile
Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/compiler/tables.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
(* $Id$ *) (* $Id$ *)


open StdLabels open StdLabels
open Support


(* Internal compiler errors *) (* Internal compiler errors *)


Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/support/fileevent.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
(* $Id$ *) (* $Id$ *)


open Unix open Unix
open Support
open Protocol open Protocol


external add_file_input : file_descr -> cbid -> unit external add_file_input : file_descr -> cbid -> unit
Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/support/protocol.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


(* $Id$ *) (* $Id$ *)


open Support
open Widget open Widget


type callback_buffer = string list type callback_buffer = string list
Expand Down
2 changes: 0 additions & 2 deletions otherlibs/labltk/support/rawwidget.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@


(* $Id$ *) (* $Id$ *)


open Support

(* (*
* Widgets * Widgets
*) *)
Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/support/textvariable.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


(* $Id$ *) (* $Id$ *)


open Support
open Protocol open Protocol


external internal_tracevar : string -> cbid -> unit external internal_tracevar : string -> cbid -> unit
Expand Down
1 change: 0 additions & 1 deletion otherlibs/labltk/support/timer.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
(* $Id$ *) (* $Id$ *)


(* Timers *) (* Timers *)
open Support
open Protocol open Protocol


type tkTimer = int type tkTimer = int
Expand Down
2 changes: 1 addition & 1 deletion otherlibs/systhreads/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include ../../config/Makefile
CAMLC=../../ocamlcomp.sh -I ../unix CAMLC=../../ocamlcomp.sh -I ../unix
CAMLOPT=../../ocamlcompopt.sh -I ../unix CAMLOPT=../../ocamlcompopt.sh -I ../unix
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
COMPFLAGS=-warn-error A -g COMPFLAGS=-w +33 -warn-error A -g


BYTECODE_C_OBJS=st_stubs_b.o BYTECODE_C_OBJS=st_stubs_b.o
NATIVECODE_C_OBJS=st_stubs_n.o NATIVECODE_C_OBJS=st_stubs_n.o
Expand Down
2 changes: 1 addition & 1 deletion otherlibs/systhreads/Makefile.nt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include ../../config/Makefile
# Compilation options # Compilation options
CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../win32unix CAMLC=../../boot/ocamlrun ../../ocamlc -I ../../stdlib -I ../win32unix
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../win32unix
COMPFLAGS=-warn-error A -g COMPFLAGS=-w +33 -warn-error A -g
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
CFLAGS=-I../../byterun $(EXTRACFLAGS) CFLAGS=-I../../byterun $(EXTRACFLAGS)


Expand Down
2 changes: 1 addition & 1 deletion otherlibs/threads/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CC=$(BYTECC)
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
CAMLC=../../ocamlcomp.sh -I ../unix CAMLC=../../ocamlcomp.sh -I ../unix
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
COMPFLAGS=-warn-error A COMPFLAGS=-w +33 -warn-error A


C_OBJS=scheduler.o C_OBJS=scheduler.o


Expand Down
2 changes: 0 additions & 2 deletions parsing/parse.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@


(* Entry points in the parser *) (* Entry points in the parser *)


open Location

(* Skip tokens to the end of the phrase *) (* Skip tokens to the end of the phrase *)


let rec skip_phrase lexbuf = let rec skip_phrase lexbuf =
Expand Down
2 changes: 1 addition & 1 deletion stdlib/Makefile.shared
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include ../config/Makefile
RUNTIME=../boot/ocamlrun RUNTIME=../boot/ocamlrun
COMPILER=../ocamlc COMPILER=../ocamlc
CAMLC=$(RUNTIME) $(COMPILER) CAMLC=$(RUNTIME) $(COMPILER)
COMPFLAGS=-strict-sequence -g -warn-error A -nostdlib COMPFLAGS=-strict-sequence -w +33 -g -warn-error A -nostdlib
OPTCOMPILER=../ocamlopt OPTCOMPILER=../ocamlopt
CAMLOPT=$(RUNTIME) $(OPTCOMPILER) CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
OPTCOMPFLAGS=-warn-error A -nostdlib -g OPTCOMPFLAGS=-warn-error A -nostdlib -g
Expand Down
1 change: 0 additions & 1 deletion toplevel/expunge.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* "Expunge" a toplevel by removing compiler modules from the global List.map. (* "Expunge" a toplevel by removing compiler modules from the global List.map.
Usage: expunge <source file> <dest file> <names of modules to keep> *) Usage: expunge <source file> <dest file> <names of modules to keep> *)


open Sys
open Misc open Misc


module StringSet = module StringSet =
Expand Down
1 change: 0 additions & 1 deletion toplevel/toploop.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* The interactive toplevel loop *) (* The interactive toplevel loop *)


open Path open Path
open Lexing
open Format open Format
open Config open Config
open Misc open Misc
Expand Down
1 change: 0 additions & 1 deletion typing/datarepr.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* Compute constructor and label descriptions from type declarations, (* Compute constructor and label descriptions from type declarations,
determining their representation. *) determining their representation. *)


open Misc
open Asttypes open Asttypes
open Types open Types
open Btype open Btype
Expand Down
1 change: 0 additions & 1 deletion typing/includeclass.mli
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
(* Inclusion checks for the class language *) (* Inclusion checks for the class language *)


open Types open Types
open Typedtree
open Ctype open Ctype
open Format open Format


Expand Down
1 change: 0 additions & 1 deletion typing/includecore.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


(* Inclusion checks for the core language *) (* Inclusion checks for the core language *)


open Misc
open Asttypes open Asttypes
open Path open Path
open Types open Types
Expand Down
1 change: 0 additions & 1 deletion typing/typeclass.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


(* $Id$ *) (* $Id$ *)


open Misc
open Parsetree open Parsetree
open Asttypes open Asttypes
open Path open Path
Expand Down
1 change: 0 additions & 1 deletion typing/typedecl.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ open Asttypes
open Parsetree open Parsetree
open Primitive open Primitive
open Types open Types
open Typedtree
open Typetexp open Typetexp


type error = type error =
Expand Down
1 change: 0 additions & 1 deletion typing/types.ml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


(* Representation of types and declarations *) (* Representation of types and declarations *)


open Misc
open Asttypes open Asttypes


(* Type expressions for the core language *) (* Type expressions for the core language *)
Expand Down

0 comments on commit 7f655f4

Please sign in to comment.