mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
fix gcc4 warnings
svn path=/trunk/; revision=13920
This commit is contained in:
parent
7dbc98c96c
commit
7b9b41e304
2 changed files with 9 additions and 7 deletions
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
/* get the decomposition of a Unicode char */
|
||||
int get_decomposition( WCHAR src, WCHAR *dst, unsigned int dstlen )
|
||||
{
|
||||
|
@ -256,25 +258,25 @@ int wine_cp_mbstowcs( const union cptable *table, int flags,
|
|||
{
|
||||
if (flags & MB_ERR_INVALID_CHARS)
|
||||
{
|
||||
if (check_invalid_chars_sbcs( &table->sbcs, src, srclen )) return -2;
|
||||
if (check_invalid_chars_sbcs( &table->sbcs, (const uchar*)src, srclen )) return -2;
|
||||
}
|
||||
if (!(flags & MB_COMPOSITE))
|
||||
{
|
||||
if (!dstlen) return srclen;
|
||||
return mbstowcs_sbcs( &table->sbcs, src, srclen, dst, dstlen );
|
||||
return mbstowcs_sbcs( &table->sbcs, (const uchar*)src, srclen, dst, dstlen );
|
||||
}
|
||||
return mbstowcs_sbcs_decompose( &table->sbcs, src, srclen, dst, dstlen );
|
||||
return mbstowcs_sbcs_decompose( &table->sbcs, (const uchar*)src, srclen, dst, dstlen );
|
||||
}
|
||||
else /* mbcs */
|
||||
{
|
||||
if (flags & MB_ERR_INVALID_CHARS)
|
||||
{
|
||||
if (check_invalid_chars_dbcs( &table->dbcs, src, srclen )) return -2;
|
||||
if (check_invalid_chars_dbcs( &table->dbcs, (const uchar*)src, srclen )) return -2;
|
||||
}
|
||||
if (!(flags & MB_COMPOSITE))
|
||||
return mbstowcs_dbcs( &table->dbcs, src, srclen, dst, dstlen );
|
||||
return mbstowcs_dbcs( &table->dbcs, (const uchar*)src, srclen, dst, dstlen );
|
||||
else
|
||||
return mbstowcs_dbcs_decompose( &table->dbcs, src, srclen, dst, dstlen );
|
||||
return mbstowcs_dbcs_decompose( &table->dbcs, (const uchar*)src, srclen, dst, dstlen );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ static int wcstombs_sbcs_slow( const struct sbcs_table *table, int flags,
|
|||
int tmp;
|
||||
WCHAR composed;
|
||||
|
||||
if (!defchar) defchar = &table_default;
|
||||
if (!defchar) defchar = (const char*)&table_default;
|
||||
if (!used) used = &tmp; /* avoid checking on every char */
|
||||
*used = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue