diff --git a/include/aws/common/array_list.inl b/include/aws/common/array_list.inl index 42f447e92..5472104c6 100644 --- a/include/aws/common/array_list.inl +++ b/include/aws/common/array_list.inl @@ -123,7 +123,7 @@ AWS_STATIC_IMPL void aws_array_list_clean_up_secure(struct aws_array_list *AWS_RESTRICT list) { AWS_PRECONDITION(AWS_IS_ZEROED(*list) || aws_array_list_is_valid(list)); if (list->alloc && list->data) { - aws_secure_zero((void *)list->data, list->current_size); + aws_secure_zero(list->data, list->current_size); aws_mem_release(list->alloc, list->data); } diff --git a/include/aws/common/math.inl b/include/aws/common/math.inl index 2081fbcca..e2c56963a 100644 --- a/include/aws/common/math.inl +++ b/include/aws/common/math.inl @@ -84,9 +84,9 @@ AWS_STATIC_IMPL int aws_sub_u32_checked(uint32_t a, uint32_t b, uint32_t *r) { */ AWS_STATIC_IMPL size_t aws_mul_size_saturating(size_t a, size_t b) { #if SIZE_BITS == 32 - return (size_t)aws_mul_u32_saturating(a, b); + return aws_mul_u32_saturating(a, b); #elif SIZE_BITS == 64 - return (size_t)aws_mul_u64_saturating(a, b); + return aws_mul_u64_saturating(a, b); #else # error "Target not supported" #endif @@ -111,9 +111,9 @@ AWS_STATIC_IMPL int aws_mul_size_checked(size_t a, size_t b, size_t *r) { */ AWS_STATIC_IMPL size_t aws_add_size_saturating(size_t a, size_t b) { #if SIZE_BITS == 32 - return (size_t)aws_add_u32_saturating(a, b); + return aws_add_u32_saturating(a, b); #elif SIZE_BITS == 64 - return (size_t)aws_add_u64_saturating(a, b); + return aws_add_u64_saturating(a, b); #else # error "Target not supported" #endif @@ -125,9 +125,9 @@ AWS_STATIC_IMPL size_t aws_add_size_saturating(size_t a, size_t b) { */ AWS_STATIC_IMPL int aws_add_size_checked(size_t a, size_t b, size_t *r) { #if SIZE_BITS == 32 - return aws_add_u32_checked(a, b, (uint32_t *)r); + return aws_add_u32_checked(a, b, r); #elif SIZE_BITS == 64 - return aws_add_u64_checked(a, b, (uint64_t *)r); + return aws_add_u64_checked(a, b, r); #else # error "Target not supported" #endif @@ -135,9 +135,9 @@ AWS_STATIC_IMPL int aws_add_size_checked(size_t a, size_t b, size_t *r) { AWS_STATIC_IMPL size_t aws_sub_size_saturating(size_t a, size_t b) { #if SIZE_BITS == 32 - return (size_t)aws_sub_u32_saturating(a, b); + return aws_sub_u32_saturating(a, b); #elif SIZE_BITS == 64 - return (size_t)aws_sub_u64_saturating(a, b); + return aws_sub_u64_saturating(a, b); #else # error "Target not supported" #endif @@ -145,9 +145,9 @@ AWS_STATIC_IMPL size_t aws_sub_size_saturating(size_t a, size_t b) { AWS_STATIC_IMPL int aws_sub_size_checked(size_t a, size_t b, size_t *r) { #if SIZE_BITS == 32 - return aws_sub_u32_checked(a, b, (uint32_t *)r); + return aws_sub_u32_checked(a, b, r); #elif SIZE_BITS == 64 - return aws_sub_u64_checked(a, b, (uint64_t *)r); + return aws_sub_u64_checked(a, b, r); #else # error "Target not supported" #endif