git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix compilation warnings with recent compiler
[protos/libecoli.git]
/
src
/
ecoli_malloc.c
diff --git
a/src/ecoli_malloc.c
b/src/ecoli_malloc.c
index
5a022ae
..
e7f02df
100644
(file)
--- a/
src/ecoli_malloc.c
+++ b/
src/ecoli_malloc.c
@@
-7,6
+7,7
@@
#include <ecoli_malloc.h>
#include <stdlib.h>
#include <ecoli_malloc.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <string.h>
#include <errno.h>
@@
-164,7
+165,10
@@
static int ec_malloc_testcase(void)
ec_free_func(ptr);
ptr = NULL;
ec_free_func(ptr);
ptr = NULL;
- ptr = ec_calloc(2, (size_t)-1);
+ /* here we use atoll() instead of a constant because we want to
+ * prevent the compiler to check the overflow at compilation
+ * time */
+ ptr = ec_calloc(2, atoll("0xffffffffffffffff"));
EC_TEST_CHECK(ptr == NULL, "bad overflow check in ec_calloc\n");
return testres;
EC_TEST_CHECK(ptr == NULL, "bad overflow check in ec_calloc\n");
return testres;