diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 25d5ea5728f..185d969d78d 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -167,7 +167,8 @@ typedef off_t my_off_t; #define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR)) #define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR) #define REGION_OVERFLOW(A, Z) \ - (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || (my_off_t)((A) + (Z)) < (my_off_t)(A)) + (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || HADDR_UNDEF == (A) + (Z) || \ + (my_off_t)((A) + (Z)) < (my_off_t)(A)) /* Prototypes */ static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 1acf6b9dfcf..58ad5fdae81 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3346,7 +3346,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * * way to print off_t values. There's no real standard for off_t other * than it must be signed, according to POSIX. */ - h5tools_str_append(&buffer, " OFFSET %"PRIuHADDR"", offset); + h5tools_str_append(&buffer, " OFFSET %" PRIuHADDR "", offset); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); }