summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5FDcore.c8
-rw-r--r--src/H5FDdirect.c4
-rw-r--r--src/H5FDlog.c4
-rw-r--r--src/H5FDsec2.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 3767420..7c48469 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -393,7 +393,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"write to backing store failed: time = %s, filename = '%s', file descriptor = %d, "
@@ -871,8 +871,8 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
* partial results, and the end of the file.
*/
- uint8_t *mem = file->mem; /* memory pointer for writes */
- HDoff_t offset = (HDoff_t)0; /* offset for reading */
+ uint8_t *mem = file->mem; /* memory pointer for writes */
+ HDoff_t offset = 0; /* offset for reading */
while (size > 0) {
h5_posix_io_t bytes_in = 0; /* # of bytes to read */
@@ -900,7 +900,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
HGOTO_ERROR(
H5E_IO, H5E_READERROR, NULL,
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 08c4a83..49f80d4 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -541,7 +541,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
}
else {
file->fa.must_align = false;
- if (-1 == HDftruncate(file->fd, (HDoff_t)0))
+ if (-1 == HDftruncate(file->fd, 0))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to truncate file")
}
}
@@ -554,7 +554,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
}
else {
if (o_flags & O_RDWR) {
- if (HDlseek(file->fd, (HDoff_t)0, SEEK_SET) < 0)
+ if (HDlseek(file->fd, 0, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to seek to proper position")
if (HDwrite(file->fd, buf1, sizeof(int)) < 0)
file->fa.must_align = true;
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index e35a6a6..64d3662 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -1229,7 +1229,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_READ)
fprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
@@ -1448,7 +1448,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_WRITE)
fprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 15accf7..c4bfbff 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -697,7 +697,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
@@ -803,7 +803,7 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
int myerrno = errno;
time_t mytime = HDtime(NULL);
- offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
+ offset = HDlseek(file->fd, 0, SEEK_CUR);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "