X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstnmem.c;h=80a2e56d5a005c3de28903e0dacd45a37abc344f;hb=055f23ee3692349a03f681ef1a0d5fd70c0cc770;hp=aeda13ae939a54c046566be4112469dd3829cd5a;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/test/tstnmem.c b/test/tstnmem.c index aeda13a..80a2e56 100644 --- a/test/tstnmem.c +++ b/test/tstnmem.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -26,21 +26,21 @@ void tst(void) for (j = 1; j<500; j++) { - cp = nmem_malloc(n, j); + cp = (char *) nmem_malloc(n, j); YAZ_CHECK(cp); - if (sizeof(long) >= j) + if ((int) sizeof(long) >= j) *(long*) cp = 123L; #if HAVE_LONG_LONG - if (sizeof(long long) >= j) + if ((int) sizeof(long long) >= j) *(long long*) cp = 123L; #endif - if (sizeof(double) >= j) + if ((int) sizeof(double) >= j) *(double*) cp = 12.2; } for (j = 2000; j<20000; j+= 2000) { - cp = nmem_malloc(n, j); + cp = (char *) nmem_malloc(n, j); YAZ_CHECK(cp); } nmem_destroy(n); @@ -55,6 +55,7 @@ int main (int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab