diff options
author | kmu <kmu@hdfgroup.org> | 2019-11-25 18:48:51 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2019-11-25 18:48:51 (GMT) |
commit | d242a900f420b040e364f6c0976c01593e955db3 (patch) | |
tree | 7b6849d8aff9ab9c9fe4b8f6ac40113e69454de3 /tools/test/h5diff/dynlib_diff.c | |
parent | 3613ec7296a782c86ea5f0706a5a0cb51602abc9 (diff) | |
download | hdf5-d242a900f420b040e364f6c0976c01593e955db3.zip hdf5-d242a900f420b040e364f6c0976c01593e955db3.tar.gz hdf5-d242a900f420b040e364f6c0976c01593e955db3.tar.bz2 |
fix issues from previous PR comments
Diffstat (limited to 'tools/test/h5diff/dynlib_diff.c')
-rw-r--r-- | tools/test/h5diff/dynlib_diff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c index 4f2d435..5989b38 100644 --- a/tools/test/h5diff/dynlib_diff.c +++ b/tools/test/h5diff/dynlib_diff.c @@ -16,6 +16,7 @@ #include <stdlib.h> #include <stdio.h> #include "H5PLextern.h" +#include "H5private.h" #define H5Z_FILTER_DYNLIBUD 300 #define MULTIPLIER 3 @@ -69,7 +70,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, /* Subtract the original value with MULTIPLIER */ while(buf_left > 0) { char temp = *int_ptr; - *int_ptr = (char)(temp - MULTIPLIER); + ASSIGN_TO_SMALLER_SIZE(*int_ptr, char, temp - MULTIPLIER, int); int_ptr++; buf_left -= sizeof(*int_ptr); } /* end while */ @@ -78,7 +79,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, /* Add the original value with MULTIPLIER */ while(buf_left > 0) { char temp = *int_ptr; - *int_ptr = (char)(temp + MULTIPLIER); + ASSIGN_TO_SMALLER_SIZE(*int_ptr, char, temp + MULTIPLIER, int); int_ptr++; buf_left -= sizeof(*int_ptr); } /* end while */ |