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_codepage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_codepage.cpp') diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index a2df8cf7e..74b8f138e 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -270,7 +270,8 @@ class ModuleCodepage final bool front = tag->getBool("front", false); for (unsigned long pos = begin; pos <= end; ++pos) { - switch (newcodepage->AllowCharacter(pos, front)) + // This cast could be unsafe but it's not obvious how to make it safe. + switch (newcodepage->AllowCharacter(static_cast(pos), front)) { case Codepage::ACR_OKAY: ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Marked %lu (%.4s) as allowed (front: %s)", -- cgit v1.3.1-10-gc9f91