From a1b971669cd3e0913026b8f5f800fb251a8f641f Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 8 Oct 2022 06:18:34 -0600 Subject: [PATCH] uvoffuni_to_utf8_flags_msgs(): Fix compiler warning A parameter to this function was declared const in embed.fnc, but isn't const. This commit also adds a const to another parameter that is constant. --- embed.fnc | 2 +- proto.h | 2 +- utf8.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/embed.fnc b/embed.fnc index 1debdbe18f8c..96b99500a3c9 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3673,7 +3673,7 @@ CMdp |U8 * |uvoffuni_to_utf8_flags \ Cp |U8 * |uvoffuni_to_utf8_flags_msgs \ |NN U8 *d \ |UV input_uv \ - |const UV flags \ + |UV flags \ |NULLOK HV **msgs CDbp |U8 * |uvuni_to_utf8 |NN U8 *d \ |UV uv diff --git a/proto.h b/proto.h index 8ca646c4c8bd..80f6d25155c9 100644 --- a/proto.h +++ b/proto.h @@ -5156,7 +5156,7 @@ Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); assert(d) PERL_CALLCONV U8 * -Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, const UV flags, HV **msgs); +Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV **msgs); #define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS_MSGS \ assert(d) diff --git a/utf8.c b/utf8.c index 701aab85525a..3414b9b3eeff 100644 --- a/utf8.c +++ b/utf8.c @@ -203,7 +203,7 @@ The caller, of course, is responsible for freeing any returned HV. /* Undocumented; we don't want people using this. Instead they should use * uvchr_to_utf8_flags_msgs() */ U8 * -Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs) +Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, const UV input_uv, UV flags, HV** msgs) { U8 *p; UV shifted_uv = input_uv;