Add type casts for tests for C++ compile
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 16 Jun 2009 09:01:24 +0000 (11:01 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 16 Jun 2009 09:01:24 +0000 (11:01 +0200)
test/tst_record_conv.c
test/tstxmalloc.c

index 2ca35d0..ffe3c4f 100644 (file)
@@ -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
             {
index 4d5f8e5..c43e265 100644 (file)
@@ -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);