diff options
author | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2017-03-10 17:29:21 +0100 |
---|---|---|
committer | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2017-03-13 13:55:08 +0100 |
commit | adcb4497968dbdc1b0db97998488ad20c02fe225 (patch) | |
tree | a808375cb22f26cd7b65baefd1cd79b4426b94c7 /byterun/spacetime.c | |
parent | ad72a6749c2e61cf30eb4e55a8787d45a5d5f10b (diff) | |
download | ocaml-adcb4497968dbdc1b0db97998488ad20c02fe225.tar.gz |
Assertions cleanup
Replace a few occurrences of assert and many occurrences of Assert
by CAMLassert.
In asmrun/spacetime_snapshot.c, the line
Assert(0); /* unreachable */
in the function caml_spacetime_shape_table has been removed
rather than replaced because the caml_failwith function called
just above has the noreturn attribute which should be enough to
keep compilers happy.
The same holds in the function caml_spacetime_only_works_for_native_code
defined in byterun/spacetime.c
Diffstat (limited to 'byterun/spacetime.c')
-rw-r--r-- | byterun/spacetime.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/byterun/spacetime.c b/byterun/spacetime.c index 7d226dd38f..2b0bf1dc21 100644 --- a/byterun/spacetime.c +++ b/byterun/spacetime.c @@ -12,7 +12,6 @@ /* */ /**************************************************************************/ -#include <assert.h> #include "caml/fail.h" #include "caml/mlvalues.h" @@ -21,7 +20,6 @@ int caml_ensure_spacetime_dot_o_is_included = 42; CAMLprim value caml_spacetime_only_works_for_native_code(value foo, ...) { caml_failwith("Spacetime profiling only works for native code"); - assert(0); /* unreachable */ } uintnat caml_spacetime_my_profinfo (void) |