Skip to content

Commit

Permalink
can I just remove the cast?
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jul 30, 2024
1 parent a02e7f0 commit 6bc7e80
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions include/aws/common/math.inl
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ AWS_EXTERN_C_BEGIN
# pragma warning(disable : 4127) /*Disable "conditional expression is constant" */
#endif /* _MSC_VER */

#ifdef __cplusplus
# if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuseless-cast"
# endif
#endif

AWS_STATIC_IMPL uint64_t aws_sub_u64_saturating(uint64_t a, uint64_t b) {
return a <= b ? 0 : a - b;
}
Expand Down Expand Up @@ -93,7 +86,7 @@ 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);
#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
Expand Down

0 comments on commit 6bc7e80

Please sign in to comment.