Skip to content

Commit

Permalink
Add semicolons to the end of HSYS_GOTO_ERROR
Browse files Browse the repository at this point in the history
Looks like we forgot these when we did the other macros.
  • Loading branch information
derobins committed Mar 20, 2024
1 parent 4c0f146 commit 8e12e11
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
12 changes: 6 additions & 6 deletions src/H5FDcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
if ((fd = HDopen(name, o_flags | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file");
if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");
} /* end if */
} /* end if */
/* Open backing store, and get stat() from file. The only case that backing
Expand All @@ -777,7 +777,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
if ((fd = HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file");
if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");
} /* end if */

/* Create the new file struct */
Expand Down Expand Up @@ -1567,7 +1567,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool closing)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#else /* H5_HAVE_WIN32_API */
if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

} /* end if */
Expand Down Expand Up @@ -1620,7 +1620,7 @@ H5FD__core_lock(H5FD_t *_file, bool rw)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file");
} /* end if */
} /* end if */

Expand Down Expand Up @@ -1656,7 +1656,7 @@ H5FD__core_unlock(H5FD_t *_file)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to unlock file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to unlock file");
}

done:
Expand Down Expand Up @@ -1690,7 +1690,7 @@ H5FD__core_delete(const char *filename, hid_t fapl_id)

if (fa->backing_store)
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file");

done:
FUNC_LEAVE_NOAPI(ret_value)
Expand Down
42 changes: 21 additions & 21 deletions src/H5FDdirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad

/* Open the file */
if ((fd = HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW)) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file");

if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");

/* Create the new file struct */
if (NULL == (file = H5FL_CALLOC(H5FD_direct_t)))
Expand Down Expand Up @@ -542,7 +542,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, 0))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to truncate file")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to truncate file");
}
}
else {
Expand All @@ -555,7 +555,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, 0, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, NULL, "unable to seek to proper position")
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;
else
Expand Down Expand Up @@ -603,7 +603,7 @@ H5FD__direct_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE

if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file");

H5FL_FREE(H5FD_direct_t, file);

Expand Down Expand Up @@ -862,15 +862,15 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
/* Seek to the correct location */
if ((addr != file->pos || OP_READ != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
/* Read the aligned data in file first, being careful of interrupted
* system calls and partial results. */
while (size > 0) {
do {
nbytes = HDread(file->fd, buf, size);
} while (-1 == nbytes && EINTR == errno);
if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed");
if (0 == nbytes) {
/* end of file but not end of format address space */
memset(buf, 0, size);
Expand Down Expand Up @@ -902,7 +902,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
/* look for the aligned position for reading the data */
assert(!(((addr / _fbsize) * _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/*
* Read the aligned data in file into aligned buffer first, then copy the data
Expand Down Expand Up @@ -930,7 +930,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
} while (-1 == nbytes && EINTR == errno);

if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed");

/* Copy the needed data from the copy buffer to the output
* buffer, and update copy_size. If the copy buffer does not
Expand Down Expand Up @@ -1042,14 +1042,14 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
if (!_must_align || ((addr % _fbsize == 0) && (size % _fbsize == 0) && ((size_t)buf % _boundary == 0))) {
/* Seek to the correct location */
if ((addr != file->pos || OP_WRITE != file->op) && HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

while (size > 0) {
do {
nbytes = HDwrite(file->fd, buf, size);
} while (-1 == nbytes && EINTR == errno);
if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed");
assert(nbytes > 0);
assert((size_t)nbytes <= size);
H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
Expand Down Expand Up @@ -1079,7 +1079,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_

/* look for the right position for reading or writing the data */
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

p3 = buf;
do {
Expand Down Expand Up @@ -1120,7 +1120,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
/* Seek to the last block, for reading */
assert(!((write_addr + write_size - _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
} /* end if */
else
p1 = NULL;
Expand All @@ -1132,7 +1132,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} while (-1 == nbytes && EINTR == errno);

if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed");
} /* end if */

/* look for the right position and append or copy the data to be written to
Expand All @@ -1156,7 +1156,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
/*look for the aligned position for writing the data*/
assert(!(write_addr % _fbsize));
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/*
* Write the data. It doesn't truncate the extra data introduced by
Expand All @@ -1168,7 +1168,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} while (-1 == nbytes && EINTR == errno);

if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed");

/* update the write address */
write_addr += write_size;
Expand Down Expand Up @@ -1244,7 +1244,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#else /* H5_HAVE_WIN32_API */
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

/* Update the eof value */
Expand All @@ -1259,7 +1259,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_
*write introduces some extra data for alignment.
*/
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
}

done:
Expand Down Expand Up @@ -1301,7 +1301,7 @@ H5FD__direct_lock(H5FD_t *_file, bool rw)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file");
}

done:
Expand Down Expand Up @@ -1335,7 +1335,7 @@ H5FD__direct_unlock(H5FD_t *_file)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file");
}

done:
Expand All @@ -1361,7 +1361,7 @@ H5FD__direct_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
assert(filename);

if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file");

done:
FUNC_LEAVE_NOAPI(ret_value)
Expand Down
16 changes: 8 additions & 8 deletions src/H5FDlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)

/* Get the file stats */
if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");

/* Stop timer for stat() call */
if (fa->flags & H5FD_LOG_TIME_STAT)
Expand Down Expand Up @@ -661,7 +661,7 @@ H5FD__log_close(H5FD_t *_file)

/* Close the underlying file */
if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file");

/* Stop timer for close() call */
if (file->fa.flags & H5FD_LOG_TIME_CLOSE)
Expand Down Expand Up @@ -1163,7 +1163,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
H5_timer_start(&seek_timer);

if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/* Stop timer for seek() call */
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
Expand Down Expand Up @@ -1382,7 +1382,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
H5_timer_start(&seek_timer);

if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");

/* Stop timer for seek() call */
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
Expand Down Expand Up @@ -1587,7 +1587,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UNU
#else /* H5_HAVE_WIN32_API */
/* Truncate/extend the file */
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

/* Stop timer for truncate operation */
Expand Down Expand Up @@ -1664,7 +1664,7 @@ H5FD__log_lock(H5FD_t *_file, bool rw)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file");
}

done:
Expand Down Expand Up @@ -1698,7 +1698,7 @@ H5FD__log_unlock(H5FD_t *_file)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file");
}

done:
Expand All @@ -1724,7 +1724,7 @@ H5FD__log_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
assert(filename);

if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file");

done:
FUNC_LEAVE_NOAPI(ret_value)
Expand Down
16 changes: 8 additions & 8 deletions src/H5FDsec2.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
} /* end if */

if (HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file");

/* Create the new file struct */
if (NULL == (file = H5FL_CALLOC(H5FD_sec2_t)))
Expand Down Expand Up @@ -420,7 +420,7 @@ H5FD__sec2_close(H5FD_t *_file)

/* Close the underlying file */
if (HDclose(file->fd) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file");

/* Release the file info */
file = H5FL_FREE(H5FD_sec2_t, file);
Expand Down Expand Up @@ -664,7 +664,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Seek to the correct location (if we don't have pread) */
if (addr != file->pos || OP_READ != file->op)
if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
#endif /* H5_HAVE_PREADWRITE */

/* Read data, being careful of interrupted system calls, partial results,
Expand Down Expand Up @@ -770,7 +770,7 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
/* Seek to the correct location (if we don't have pwrite) */
if (addr != file->pos || OP_WRITE != file->op)
if (HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position");
#endif /* H5_HAVE_PREADWRITE */

/* Write the data, being careful of interrupted system calls and partial
Expand Down Expand Up @@ -887,7 +887,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, bool H5_ATTR_UN
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#else /* H5_HAVE_WIN32_API */
if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly");
#endif /* H5_HAVE_WIN32_API */

/* Update the eof value */
Expand Down Expand Up @@ -937,7 +937,7 @@ H5FD__sec2_lock(H5FD_t *_file, bool rw)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock file");
}

done:
Expand Down Expand Up @@ -971,7 +971,7 @@ H5FD__sec2_unlock(H5FD_t *_file)
errno = 0;
}
else
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock file");
}

done:
Expand All @@ -997,7 +997,7 @@ H5FD__sec2_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
assert(filename);

if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file");

done:
FUNC_LEAVE_NOAPI(ret_value)
Expand Down
4 changes: 2 additions & 2 deletions src/H5Fint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2826,11 +2826,11 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n

/* Stat the filename we're resolving */
if (HDstat(name, &st) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to stat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to stat file");

/* Stat the file we opened */
if (HDfstat(*fd, &fst) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to fstat file")
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to fstat file");

/* Verify that the files are really the same */
if (st.st_mode != fst.st_mode || st.st_ino != fst.st_ino || st.st_dev != fst.st_dev)
Expand Down

0 comments on commit 8e12e11

Please sign in to comment.