aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-09 16:12:03 +0900
committergit <svn-admin@ruby-lang.org>2023-11-09 07:20:00 +0000
commit195a09cc7ff07f3488835ff9cc374e28f03b487e (patch)
treee3af11566acc5a7bb15a2c436b3d19fcde45e161 /ext
parent7e8d9f49b39b07f5be4505f83517fd2f9c807020 (diff)
downloadruby-195a09cc7ff07f3488835ff9cc374e28f03b487e.tar.gz
[ruby/digest] Suppress implicit cast down warnings
https://github.com/ruby/digest/commit/2f3505bf3f
Diffstat (limited to 'ext')
-rw-r--r--ext/digest/digest.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/digest/digest.h b/ext/digest/digest.h
index 8a4c5b7e4e..68a3da5dd2 100644
--- a/ext/digest/digest.h
+++ b/ext/digest/digest.h
@@ -40,7 +40,8 @@ rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \
for (; size > stride; size -= stride, ptr += stride) { \
name##_Update(ctx, ptr, stride); \
} \
- if (size > 0) name##_Update(ctx, ptr, size); \
+ /* Since size <= stride, size should fit into an unsigned int */ \
+ if (size > 0) name##_Update(ctx, ptr, (unsigned int)size); \
}
#define DEFINE_FINISH_FUNC_FROM_FINAL(name) \