summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 0fe1867..9ad33b2 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -178,19 +178,19 @@ typedef struct H5F_t H5F_t;
/* Decode a variable-sized buffer */
/* (Assumes that the high bits of the integer will be zero) */
-# define DECODE_VAR(p, typ, n, l) { \
+# define DECODE_VAR(p, n, l) { \
size_t _i; \
\
n = 0; \
(p) += l; \
for (_i = 0; _i < l; _i++) \
- n = (typ)((n << 8) | *(--p)); \
+ n = (uint16_t)((n << 8) | *(--p)); \
(p) += l; \
}
/* Decode a variable-sized buffer into a 32-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
-# define UINT32DECODE_VAR(p, n, l) DECODE_VAR(p, uint32_t, n, l)
+# define UINT32DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
# define INT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
@@ -216,14 +216,14 @@ typedef struct H5F_t H5F_t;
/* Decode a variable-sized buffer into a 64-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
-# define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, uint64_t, n, l)
+# define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
/* Decode a 64-bit unsigned integer and its length from a variable-sized buffer */
/* (Assumes that the high bits of the integer will be zero) */
# define UINT64DECODE_VARLEN(p, n) { \
unsigned _s = *(p)++; \
\
- UINT64DECODE_VAR(p, uint64_t, n, _s); \
+ UINT64DECODE_VAR(p, n, _s); \
}
# define H5_DECODE_UNSIGNED(p, n) { \