diff options
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5private.h b/src/H5private.h index d1bbc24..0987ce9 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -279,6 +279,7 @@ * big deal if we don't. */ #ifdef __cplusplus +# define __attribute__(X) /*void*/ # define UNUSED /*void*/ # define NORETURN /*void*/ #else /* __cplusplus */ @@ -286,6 +287,7 @@ # define UNUSED __attribute__((unused)) # define NORETURN __attribute__((noreturn)) #else +# define __attribute__(X) /*void*/ # define UNUSED /*void*/ # define NORETURN /*void*/ #endif @@ -1523,11 +1525,14 @@ extern char *strdup(const char *s); /* Include the generated overflow header file */ #include "H5overflow.h" -#define H5_ASSIGN_OVERFLOW(dst, src, srctype, dsttype) \ +/* Assign a variable to one of a different size (think safer dst = (dsttype)src"). + * The code generated by the macro checks for overflows. + */ +#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \ H5_GLUE4(ASSIGN_,srctype,_TO_,dsttype)(dst,dsttype,src,srctype)\ #else /* NDEBUG */ -#define H5_ASSIGN_OVERFLOW(dst, src, srctype, dsttype) \ +#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \ (dst) = (dsttype)(src); #endif /* NDEBUG */ |