X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstnmem.c;h=80a2e56d5a005c3de28903e0dacd45a37abc344f;hp=f47392947ca2e4e98fb0516c66d022cb855b9a87;hb=f03f934986cd3ff1fbb98f8b1432d70c46f6809e;hpb=bf95c509245f5cb4025ef2db348d5f7ace3b5994 diff --git a/test/tstnmem.c b/test/tstnmem.c index f473929..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. */ @@ -28,13 +28,13 @@ void tst(void) { 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; } @@ -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