projects
/
platform
/
upstream
/
cmocka.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bc1f191
)
src: Fix pointer casts to int on LP64 platforms.
author
Steve Byan
<stevebyan@me.com>
Tue, 2 Mar 2010 02:02:40 +0000
(21:02 -0500)
committer
Andreas Schneider
<asn@cryptomilk.org>
Tue, 31 May 2011 18:48:15 +0000
(20:48 +0200)
This fixes cmockery defect 23.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
src/cmockery.c
patch
|
blob
|
history
diff --git
a/src/cmockery.c
b/src/cmockery.c
index 9ea07cb94a9c3f571e76987bf5e4000b0c37de3f..8d6ef0f9136137d062eb72a5fc2020006caa48f2 100755
(executable)
--- a/
src/cmockery.c
+++ b/
src/cmockery.c
@@
-1394,7
+1394,7
@@
void _test_free(void* const ptr, const char* file, const int line) {
unsigned int i;
char *block = (char*)ptr;
MallocBlockInfo *block_info;
- _assert_true(
(int)ptr
, "ptr", file, line);
+ _assert_true(
cast_to_largest_integral_type(ptr)
, "ptr", file, line);
block_info = (MallocBlockInfo*)(block - (MALLOC_GUARD_SIZE +
sizeof(*block_info)));
// Check the guard blocks.