Sun, 04 Nov 2012 20:50:12 +0100
fixed some compiler warnings
test/logging_tests.c | file | annotate | diff | comparison | revisions | |
ucx/mempool.c | file | annotate | diff | comparison | revisions |
1.1 --- a/test/logging_tests.c Fri Oct 12 12:46:54 2012 +0200 1.2 +++ b/test/logging_tests.c Sun Nov 04 20:50:12 2012 +0100 1.3 @@ -15,9 +15,9 @@ 1.4 ucx_logger_trace(logger, ST("[TRACE:] dont log this!\n")); 1.5 ucx_logger_error(logger, ST("[ERROR:] error!\n")); 1.6 fseek(stream, 0, SEEK_SET); 1.7 - fread(buffer, 1, 100, stream); 1.8 + int r = fread(buffer, 1, 100, stream); 1.9 1.10 - UCX_TEST_ASSERT(strncmp(buffer, 1.11 + UCX_TEST_ASSERT(r == 33 && strncmp(buffer, 1.12 "[INFO:] allright\n[ERROR:] error!\n", 33) == 0, "incorrect logs"); 1.13 1.14 UCX_TEST_END
2.1 --- a/ucx/mempool.c Fri Oct 12 12:46:54 2012 +0200 2.2 +++ b/ucx/mempool.c Sun Nov 04 20:50:12 2012 +0100 2.3 @@ -5,6 +5,7 @@ 2.4 #include <stdlib.h> 2.5 #include <string.h> 2.6 #include <stdio.h> 2.7 +#include <inttypes.h> 2.8 2.9 #include "mempool.h" 2.10 2.11 @@ -84,7 +85,8 @@ 2.12 return newm + sizeof(ucx_destructor); 2.13 } 2.14 } 2.15 - fprintf(stderr, "FATAL: %8x not in mpool %8x\n", ptr, pool); 2.16 + fprintf(stderr, "FATAL: 0x%08"PRIxPTR" not in mpool 0x%08"PRIxPTR"\n", 2.17 + (intptr_t)ptr, (intptr_t)pool); 2.18 exit(1); 2.19 } else { 2.20 return newm + sizeof(ucx_destructor);