From 2cc3fc3eb644f09db82f30906e8d9a09601f544e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Jun 2009 11:01:24 +0200 Subject: [PATCH] Add type casts for tests for C++ compile --- test/tst_record_conv.c | 10 ++++++---- test/tstxmalloc.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/tst_record_conv.c b/test/tst_record_conv.c index 2ca35d0..ffe3c4f 100644 --- a/test/tst_record_conv.c +++ b/test/tst_record_conv.c @@ -182,10 +182,12 @@ static int conv_convert_test(yaz_record_conv_t p, else if (strcmp(output_expect_record, wrbuf_cstr(output_record))) { ret = 0; - printf("got-output_record len=%d: %s\n", - wrbuf_len(output_record),wrbuf_cstr(output_record)); - printf("output_expect_record len=%d %s\n", - strlen(output_expect_record), output_expect_record); + printf("got-output_record len=%ld: %s\n", + (long) wrbuf_len(output_record), + wrbuf_cstr(output_record)); + printf("output_expect_record len=%ld %s\n", + (long) strlen(output_expect_record), + output_expect_record); } else { diff --git a/test/tstxmalloc.c b/test/tstxmalloc.c index 4d5f8e5..c43e265 100644 --- a/test/tstxmalloc.c +++ b/test/tstxmalloc.c @@ -16,9 +16,9 @@ void tst(void) { char *p = 0; - p = xmalloc(10); + p = (char *) xmalloc(10); YAZ_CHECK(p); - p = xrealloc(p, 20); + p = (char *) xrealloc(p, 20); YAZ_CHECK(p); xfree(p); -- 1.7.10.4