Skip to content

Commit

Permalink
Merge pull request #98 from dra27/fix-warning
Browse files Browse the repository at this point in the history
Fix warning 6
  • Loading branch information
dra27 committed Feb 22, 2022
2 parents 02a5d3e + 7afee58 commit 4ca2ba4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 0.41
- GPR#98: Eliminate Warning 6 compiling coff.ml (David Allsopp)

Version 0.40
- GPR#65: Support for compiling objects with /bigobj (Extended COFF) (Dmitry Bely)
- GPR#80: Silence MSVC filenames for long commands as well as short ones (David Allsopp)
Expand Down
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ environment:
- OCAMLBRANCH: 4.09
- OCAMLBRANCH: 4.10
- OCAMLBRANCH: 4.11
- OCAMLBRANCH: 4.12
OCAML_PORT: mingw
ARTEFACTS: yes
MSVS_PREFERENCE: SDK7.0
- OCAMLBRANCH: 4.12
SKIP_OCAML_TEST: no
- OCAMLBRANCH: 4.13
SKIP_OCAML_TEST: no
- OCAMLBRANCH: 4.14
SKIP_OCAML_TEST: no
- OCAMLBRANCH: trunk
OCAML_PORT: mingw64
SKIP_OCAML_TEST: no
OCAMLROOT: C:/OCaml

Expand Down
38 changes: 26 additions & 12 deletions appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ case "$OCAML_PORT" in
*) echo "Unrecognised OCAML_PORT: $OCAML_PORT"; exit 1;;
esac

case "$OCAMLBRANCH" in
*.*|trunk) ;;
*) echo "Unrecognised OCAMLBRANCH: $OCAMLBRANCH"; exit 1;;
esac

echo ** OCAMLROOT=$OCAMLROOT

#echo "APPVEYOR_PULL_REQUEST_NUMBER = $APPVEYOR_PULL_REQUEST_NUMBER"
Expand All @@ -72,24 +77,33 @@ git clone https://github.com/ocaml/ocaml.git --branch $OCAMLBRANCH${OCAMLREV:+.}

cd ocaml

if [[ $OCAMLBRANCH = trunk ]]; then
OCAMLBRANCH="$(sed -ne '1s/\([^.]*\.[^.]*\).*/\1/p' VERSION)"
echo "trunk VERSION is $OCAMLBRANCH"
fi

MAKEOCAML=make
CONFIG_DIR=config
GRAPHICS_DISABLE=
HEADER_DIR=

case $OCAMLBRANCH in
3.11|3.12|4.00|4.01|4.02|4.03|4.04)
MAKEOCAML="make -f Makefile.nt"
HEADER_DIR=config
;;
4.05)
HEADER_DIR=config
;;
4.06|4.07)
HEADER_DIR=byterun/caml
;;
4.08)
GRAPHICS_DISABLE=--disable-graph-lib
3.11|3.12|4.00|4.01|4.02|4.03|4.04)
MAKEOCAML="make -f Makefile.nt"
HEADER_DIR=config;;
4.05)
HEADER_DIR=config;;
4.06|4.07)
HEADER_DIR=byterun/caml;;
4.08)
GRAPHICS_DISABLE=--disable-graph-lib;;
5.0|5.00)
case "$OCAML_PORT" in
mingw)
export PATH="$PATH:/usr/i686-w64-mingw32/sys-root/mingw/bin";;
mingw64)
export PATH="$PATH:/usr/x86_64-w64-mingw32/sys-root/mingw/bin";;
esac;;
esac

if [ $OCAMLBRANCH = "4.03" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion coff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ module Coff = struct
let tbl = Array.make h.FileHeader.symcount None in
let rec fill accu i =
if i = h.FileHeader.symcount then List.rev accu
else let s = Symbol.get h.FileHeader.bigobj strtbl ic (symtable + h.FileHeader.symsize * i) in
else let s = Symbol.get ~bigobj:h.FileHeader.bigobj strtbl ic (symtable + h.FileHeader.symsize * i) in
(try tbl.(i) <- Some s
with Invalid_argument _ -> assert false);
fill (s :: accu) (i + 1 + s.auxn) in
Expand Down

0 comments on commit 4ca2ba4

Please sign in to comment.