From 02340285c564a7e82105137192d46d554a6fce3a Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Sun, 30 May 2021 20:37:54 +0100 Subject: Added -Wshorten-64-to-32 and fixed all warnings. --- src/modules/m_md5.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_md5.cpp') diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index 9e2ee7022..bc79a3089 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -76,14 +76,14 @@ class MD5Provider : public HashProvider ctx->bytes[1] = 0; } - void MD5Update(MD5Context *ctx, byte const *buf, int len) + void MD5Update(MD5Context *ctx, byte const *buf, size_t len) { word32 t; /* Update byte count */ t = ctx->bytes[0]; - if ((ctx->bytes[0] = t + len) < t) + if ((ctx->bytes[0] = word32(t + len)) < t) ctx->bytes[1]++; /* Carry from low to high */ t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ @@ -229,7 +229,7 @@ class MD5Provider : public HashProvider } - void MyMD5(void *dest, void *orig, int len) + void MyMD5(void *dest, void *orig, size_t len) { MD5Context context; MD5Init(&context); -- cgit v1.3.1-10-gc9f91