X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstodr.c;h=4becfe0f6df36a9dc6ca70a15dd716d170f2502b;hb=8526300b58a12ecbb6e48b320839e28e4460a925;hp=61a044eede20af39d1cf436528016bf442eeff01;hpb=54cc1be5702450c1666b2dda9d0248c36650318a;p=yaz-moved-to-github.git diff --git a/test/tstodr.c b/test/tstodr.c index 61a044e..4becfe0 100644 --- a/test/tstodr.c +++ b/test/tstodr.c @@ -1,9 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 Index Data * See the file LICENSE for details. - * - * $Id: tstodr.c,v 1.11 2007-04-13 06:51:57 adam Exp $ - * */ #include #include @@ -19,12 +16,12 @@ void tst_MySequence1(ODR encode, ODR decode) int ret; char *ber_buf; int ber_len; - Yc_MySequence *s = odr_malloc(encode, sizeof(*s)); + Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s)); Yc_MySequence *t; YAZ_CHECK(s); s->first = odr_intdup(encode, 12345); - s->second = odr_malloc(encode, sizeof(*s->second)); + s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second)); s->second->buf = (unsigned char *) "hello"; s->second->len = 5; s->second->size = 0; @@ -66,7 +63,7 @@ void tst_MySequence1(ODR encode, ODR decode) YAZ_CHECK(t->myoid); if (t->myoid) { - int *myoid = odr_getoidbystr(decode, MYOID); + Odr_oid *myoid = odr_getoidbystr(decode, MYOID); YAZ_CHECK(oid_oidcmp(myoid, t->myoid) == 0); } @@ -75,11 +72,11 @@ void tst_MySequence1(ODR encode, ODR decode) void tst_MySequence2(ODR encode, ODR decode) { int ret; - Yc_MySequence *s = odr_malloc(encode, sizeof(*s)); + Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s)); YAZ_CHECK(s); s->first = 0; /* deliberately miss this .. */ - s->second = odr_malloc(encode, sizeof(*s->second)); + s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second)); s->second->buf = (unsigned char *) "hello"; s->second->len = 5; s->second->size = 0;