1
0
Fork 0

(svn r17479) -Fix: silence compile warning that's only triggered when you're using a broken iconv.

release/1.0
rubidium 2009-09-08 21:43:47 +00:00
parent b52f692c29
commit 99af06dd30
1 changed files with 5 additions and 6 deletions

View File

@ -141,11 +141,10 @@ static const char *GetLocalCode()
#endif #endif
} }
/** FYI: This is not thread-safe. /**
* convert between locales, which from and which to is set in the calling * Convert between locales, which from and which to is set in the calling
* functions OTTD2FS() and FS2OTTD(). You should NOT use this function directly * functions OTTD2FS() and FS2OTTD().
* NOTE: iconv was added in OSX 10.3. 10.2.x will still have the invalid char */
* issues. There aren't any easy fix for this */
static const char *convert_tofrom_fs(iconv_t convd, const char *name) static const char *convert_tofrom_fs(iconv_t convd, const char *name)
{ {
static char buf[1024]; static char buf[1024];
@ -153,7 +152,7 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name)
* non-const. Correct implementation is at * non-const. Correct implementation is at
* http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html */ * http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html */
#ifdef HAVE_BROKEN_ICONV #ifdef HAVE_BROKEN_ICONV
char *inbuf = (char*)name; char *inbuf = const_cast<char*>(name);
#else #else
const char *inbuf = name; const char *inbuf = name;
#endif #endif