summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-10-14 14:58:50 +0800
committerPeng Wu <alexepico@gmail.com>2010-10-14 14:58:50 +0800
commitc41635080ec47ed414e1180212b30866a673eb44 (patch)
tree95243df607dc1901e80f6d1b2a2ce916ab6ea54b /tests
parentd9268d28d322918e8294dbf81fc41f8e2e12712c (diff)
downloadlibpinyin-c41635080ec47ed414e1180212b30866a673eb44.tar.gz
libpinyin-c41635080ec47ed414e1180212b30866a673eb44.tar.xz
libpinyin-c41635080ec47ed414e1180212b30866a673eb44.zip
fixes compile warnings for printf
Diffstat (limited to 'tests')
-rwxr-xr-xtests/include/test_memory_chunk.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/include/test_memory_chunk.cpp b/tests/include/test_memory_chunk.cpp
index 3724ecd..14e339b 100755
--- a/tests/include/test_memory_chunk.cpp
+++ b/tests/include/test_memory_chunk.cpp
@@ -11,14 +11,14 @@ int main(int argc, char * argv[]){
int * p = (int *)chunk->begin();
assert(chunk->size() == sizeof(int));
printf("%d\n", *p);
- printf("%d\n", chunk->capacity());
+ printf("%ld\n", chunk->capacity());
p = & i;
chunk->set_chunk(p, sizeof(int), NULL);
short t = 5;
chunk->set_content(sizeof(int), &t, sizeof(short));
assert( sizeof(int) + sizeof(short) == chunk->size());
- printf("%d\n", chunk->capacity());
+ printf("%ld\n", chunk->capacity());
p = (int *)chunk->begin();
short * p2 =(short *)(((char *) (chunk->begin())) + sizeof(int));
@@ -27,7 +27,7 @@ int main(int argc, char * argv[]){
chunk->set_content(sizeof(int) + sizeof(short), &t, sizeof(short));
assert( sizeof(int) + (sizeof(short) << 1) == chunk->size());
- printf("%d\n", chunk->capacity());
+ printf("%ld\n", chunk->capacity());
p = (int *)chunk->begin();
p2 =(short *)(((char *) (chunk->begin())) + sizeof(int));
printf("%d\t%d\t%d\n", *p, *p2, *(p2 + 1));