From 1e7de877d35c6233e9e57b3555d24814af8bf8a9 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Thu, 3 Feb 2022 19:54:57 +0100 Subject: [PATCH] [libintl] const in n_ --- src/intl/gettext/libintl.h | 2 +- src/intl/libintl.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intl/gettext/libintl.h b/src/intl/gettext/libintl.h index 19c127e59..592507513 100644 --- a/src/intl/gettext/libintl.h +++ b/src/intl/gettext/libintl.h @@ -45,7 +45,7 @@ _(const char *msg, struct terminal *term) } static inline char * -n_(char *msg1, char *msg2, unsigned long int n, struct terminal *term) +n_(const char *msg1, const char *msg2, unsigned long int n, struct terminal *term) { return gettext_noop(msg1); } diff --git a/src/intl/libintl.h b/src/intl/libintl.h index d43d3f740..e7667a46e 100644 --- a/src/intl/libintl.h +++ b/src/intl/libintl.h @@ -121,11 +121,11 @@ __(char *file, unsigned int line, char *func, * about charset (usually during initialization or when you don't use terminals * at all), use ngettext() directly. */ static inline char * -n_(char *msg1, char *msg2, unsigned long int n, struct terminal *term) +n_(const char *msg1, const char *msg2, unsigned long int n, struct terminal *term) { /* Prevent useless (and possibly dangerous) calls. */ if (!msg1 || !*msg1) - return msg1; + return (char *)msg1; if (term) intl_set_charset(term);