diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-02 19:59:46 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-02 19:59:46 (GMT) |
commit | 79aecf895393d2871764a9405c9698fd73225925 (patch) | |
tree | e14ce866c67d4ef68916e8b79c2f3c35dc51c463 /src/H5FDstdio.c | |
parent | a36a5b30d79f037169fc5cf95a2a600ded674409 (diff) | |
download | hdf5-79aecf895393d2871764a9405c9698fd73225925.zip hdf5-79aecf895393d2871764a9405c9698fd73225925.tar.gz hdf5-79aecf895393d2871764a9405c9698fd73225925.tar.bz2 |
[svn-r12706] Description:
Clean up some of the warnings on 64-bit Linux...
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Too minor to require h5committest
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r-- | src/H5FDstdio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index fc7dd1c..92ea653 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -365,13 +365,13 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id, H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL) /* Build the return value */ - if (NULL==(file = calloc(1,sizeof(H5FD_stdio_t)))) + if(NULL==(file = calloc((size_t)1, sizeof(H5FD_stdio_t)))) H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL) file->fp = f; file->op = H5FD_STDIO_OP_SEEK; file->pos = HADDR_UNDEF; file->write_access=write_access; /* Note the write_access for later */ - if (fseek(file->fp, 0, SEEK_END) < 0) { + if(fseek(file->fp, (long)0, SEEK_END) < 0) { file->op = H5FD_STDIO_OP_UNKNOWN; } else { long x = ftell (file->fp); @@ -735,8 +735,8 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz * will advance the file position by N. If N is zero or an error * occurs then the file position is undefined. */ - n = fread(buf, 1, size, file->fp); - if (n == 0 && ferror(file->fp)) { + n = fread(buf, (size_t)1, size, file->fp); + if(n == 0 && ferror(file->fp)) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1) @@ -816,7 +816,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, * advanced by the number of bytes read. Otherwise nobody knows where it * is. */ - if (size != fwrite(buf, 1, size, file->fp)) { + if(size != fwrite(buf, (size_t)1, size, file->fp)) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1) |