From 36519b8a830204f45ec4693c89b6bdb8c9c6b79b Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sat, 13 Jul 2013 15:13:24 +0200 Subject: [PATCH] Fix compiler warning - using "const" twice for CHARSET_INFO. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CHARSET_INFO is already typedef'ed as "const" strĂșcture, thus "const CHARSET_INFO" generates multiple type modifier warning. --- include/m_ctype.h | 4 ++-- strings/ctype.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 855212957bc..5bbe1844ea6 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -620,9 +620,9 @@ my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs); extern size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n, const char* fmt, va_list ap); -uint32 my_convert(char *to, uint32 to_length, const CHARSET_INFO *to_cs, +uint32 my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, - const CHARSET_INFO *from_cs, uint *errors); + CHARSET_INFO *from_cs, uint *errors); #define _MY_U 01 /* Upper case */ #define _MY_L 02 /* Lower case */ diff --git a/strings/ctype.c b/strings/ctype.c index adff69ad680..e717dce9b38 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -447,9 +447,9 @@ my_charset_is_ascii_compatible(CHARSET_INFO *cs) static uint32 my_convert_internal(char *to, uint32 to_length, - const CHARSET_INFO *to_cs, + CHARSET_INFO *to_cs, const char *from, uint32 from_length, - const CHARSET_INFO *from_cs, uint *errors) + CHARSET_INFO *from_cs, uint *errors) { int cnvres; my_wc_t wc; @@ -517,9 +517,9 @@ outp: */ uint32 -my_convert(char *to, uint32 to_length, const CHARSET_INFO *to_cs, +my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, - const CHARSET_INFO *from_cs, uint *errors) + CHARSET_INFO *from_cs, uint *errors) { uint32 length, length2; /*