diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2013-02-26 12:47:13 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2013-02-26 12:47:13 +0000 |
commit | 8b480cb9e29a472b20b24ccf3e06d3253e5b2385 (patch) | |
tree | 3b03320a30f7a665eb44296fac7bce398c155660 /byterun | |
parent | d3d363a1a65a21ae55669607ea792ce860069d2f (diff) |
fix a few of the warnings given by newer versions of gcc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13320 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun')
-rw-r--r-- | byterun/interp.c | 2 | ||||
-rw-r--r-- | byterun/main.c | 8 | ||||
-rw-r--r-- | byterun/misc.h | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/byterun/interp.c b/byterun/interp.c index 0b5caafba..59c88e1ad 100644 --- a/byterun/interp.c +++ b/byterun/interp.c @@ -1121,7 +1121,7 @@ value caml_interprete(code_t prog, asize_t prog_size) #else caml_fatal_error_arg("Fatal error: bad opcode (%" ARCH_INTNAT_PRINTF_FORMAT "x)\n", - (char *)(*(pc-1))); + *(pc-1)); #endif } } diff --git a/byterun/main.c b/byterun/main.c index c0a205dc1..b51c31c5c 100644 --- a/byterun/main.c +++ b/byterun/main.c @@ -27,13 +27,13 @@ CAMLextern void caml_expand_command_line (int *, char ***); int main(int argc, char **argv) { #ifdef DEBUG + caml_gc_message (-1, "### OCaml runtime: debug mode ###\n", 0); +#if 0 { + int i; char *ocp; char *cp; - int i; - caml_gc_message (-1, "### OCaml runtime: debug mode ###\n", 0); -#if 0 caml_gc_message (-1, "### command line:", 0); for (i = 0; i < argc; i++){ caml_gc_message (-1, " %s", argv[i]); @@ -44,9 +44,9 @@ int main(int argc, char **argv) cp = getenv ("CAMLRUNPARAM"); caml_gc_message (-1, "### CAMLRUNPARAM=%s\n", cp == NULL ? "" : cp); caml_gc_message (-1, "### working dir: %s\n", getcwd (NULL, 0)); -#endif } #endif +#endif #ifdef _WIN32 /* Expand wildcards and diversions in command line */ caml_expand_command_line(&argc, &argv); diff --git a/byterun/misc.h b/byterun/misc.h index 40bf3b68b..2529bc612 100644 --- a/byterun/misc.h +++ b/byterun/misc.h @@ -56,7 +56,8 @@ typedef char * addr; /* <private> */ #ifdef DEBUG -#define CAMLassert(x) ((x) ? 0 : caml_failed_assert ( #x , __FILE__, __LINE__)) +#define CAMLassert(x) \ + ((x) ? (void) 0 : caml_failed_assert ( #x , __FILE__, __LINE__)) CAMLextern int caml_failed_assert (char *, char *, int); #else #define CAMLassert(x) ((void) 0) |