diff options
Diffstat (limited to 'src/H5Tfields.c')
-rw-r--r-- | src/H5Tfields.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5Tfields.c b/src/H5Tfields.c index 8202c2c..be0b5f2 100644 --- a/src/H5Tfields.c +++ b/src/H5Tfields.c @@ -344,17 +344,17 @@ H5T__sort_value(const H5T_t *dt, int *map) HDassert(size <= sizeof(tbuf)); for(i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) { for(j = 0, swapped = FALSE; j < i; j++) { - if(HDmemcmp(dt->shared->u.enumer.value + (j * size), dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) { + if(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (j * size), (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) { /* Swap names */ char *tmp = dt->shared->u.enumer.name[j]; dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1]; dt->shared->u.enumer.name[j + 1] = tmp; /* Swap values */ - H5MM_memcpy(tbuf, dt->shared->u.enumer.value + (j * size), size); - H5MM_memcpy(dt->shared->u.enumer.value + (j * size), - dt->shared->u.enumer.value + ((j + 1) * size), size); - H5MM_memcpy(dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size); + H5MM_memcpy(tbuf, (uint8_t *)dt->shared->u.enumer.value + (j * size), size); + H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + (j * size), + (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size); + H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size); /* Swap map */ if(map) { @@ -371,7 +371,7 @@ H5T__sort_value(const H5T_t *dt, int *map) #ifndef NDEBUG /* I never trust a sort :-) -RPM */ for(i = 0; i < (nmembs - 1); i++) - HDassert(HDmemcmp(dt->shared->u.enumer.value + (i * size), dt->shared->u.enumer.value + ((i + 1) * size), size) < 0); + HDassert(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * size), (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0); #endif } /* end if */ } /* end else */ @@ -457,10 +457,10 @@ H5T__sort_name(const H5T_t *dt, int *map) dt->shared->u.enumer.name[j+1] = tmp; /* Swap values */ - H5MM_memcpy(tbuf, dt->shared->u.enumer.value+j*size, size); - H5MM_memcpy(dt->shared->u.enumer.value+j*size, - dt->shared->u.enumer.value+(j+1)*size, size); - H5MM_memcpy(dt->shared->u.enumer.value+(j+1)*size, tbuf, size); + H5MM_memcpy(tbuf, (uint8_t *)dt->shared->u.enumer.value + (j * size), size); + H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + (j * size), + (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size); + H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size); /* Swap map */ if (map) { |