summaryrefslogtreecommitdiff
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-16 15:06:59 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-16 15:06:59 +0100
commit6aa2cd4be287f35f95f35c2cec6d5a24f53c4d3c (patch)
treed2277cebb1354524326ac1333b3bd47f7453c456 /src/ex_cmds2.c
parentf8df7addc5f741c16fa2a458f8777ac1fdf2e01e (diff)
downloadvim-git-6aa2cd4be287f35f95f35c2cec6d5a24f53c4d3c.tar.gz
patch 7.4.1334v7.4.1334
Problem: Many compiler warnings with MingW. Solution: Add type casts. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 49e4d3df4..3b18ecee4 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -4149,16 +4149,16 @@ ex_checktime(exarg_T *eap)
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG))
# define HAVE_GET_LOCALE_VAL
-static char *get_locale_val(int what);
+static char_u *get_locale_val(int what);
- static char *
+ static char_u *
get_locale_val(int what)
{
- char *loc;
+ char_u *loc;
/* Obtain the locale value from the libraries. For DJGPP this is
* redefined and it doesn't use the arguments. */
- loc = setlocale(what, NULL);
+ loc = (char_u *)setlocale(what, NULL);
# ifdef WIN32
if (loc != NULL)
@@ -4222,7 +4222,7 @@ gettext_lang(char_u *name)
for (i = 0; mtable[i] != NULL; i += 2)
if (STRNICMP(mtable[i], name, STRLEN(mtable[i])) == 0)
- return mtable[i + 1];
+ return (char_u *)mtable[i + 1];
return name;
}
#endif
@@ -4239,13 +4239,13 @@ get_mess_lang(void)
# ifdef HAVE_GET_LOCALE_VAL
# if defined(LC_MESSAGES)
- p = (char_u *)get_locale_val(LC_MESSAGES);
+ p = get_locale_val(LC_MESSAGES);
# else
/* This is necessary for Win32, where LC_MESSAGES is not defined and $LANG
* may be set to the LCID number. LC_COLLATE is the best guess, LC_TIME
* and LC_MONETARY may be set differently for a Japanese working in the
* US. */
- p = (char_u *)get_locale_val(LC_COLLATE);
+ p = get_locale_val(LC_COLLATE);
# endif
# else
p = mch_getenv((char_u *)"LC_ALL");
@@ -4290,7 +4290,7 @@ get_mess_env(void)
p = NULL; /* ignore something like "1043" */
# ifdef HAVE_GET_LOCALE_VAL
if (p == NULL || *p == NUL)
- p = (char_u *)get_locale_val(LC_CTYPE);
+ p = get_locale_val(LC_CTYPE);
# endif
}
}
@@ -4310,7 +4310,7 @@ set_lang_var(void)
char_u *loc;
# ifdef HAVE_GET_LOCALE_VAL
- loc = (char_u *)get_locale_val(LC_CTYPE);
+ loc = get_locale_val(LC_CTYPE);
# else
/* setlocale() not supported: use the default value */
loc = (char_u *)"C";
@@ -4320,14 +4320,14 @@ set_lang_var(void)
/* When LC_MESSAGES isn't defined use the value from $LC_MESSAGES, fall
* back to LC_CTYPE if it's empty. */
# if defined(HAVE_GET_LOCALE_VAL) && defined(LC_MESSAGES)
- loc = (char_u *)get_locale_val(LC_MESSAGES);
+ loc = get_locale_val(LC_MESSAGES);
# else
loc = get_mess_env();
# endif
set_vim_var_string(VV_LANG, loc, -1);
# ifdef HAVE_GET_LOCALE_VAL
- loc = (char_u *)get_locale_val(LC_TIME);
+ loc = get_locale_val(LC_TIME);
# endif
set_vim_var_string(VV_LC_TIME, loc, -1);
}