Fix "variable not used" warnings when USE_WIDE_UPPER_LOWER is not

defined.
This commit is contained in:
Bruce Momjian 2011-02-10 16:57:25 -05:00
parent ff81aa3eda
commit 135724ec35
2 changed files with 4 additions and 1 deletions

View File

@ -243,7 +243,9 @@ char *
lowerstr_with_len(const char *str, int len)
{
char *out;
#ifdef USE_WIDE_UPPER_LOWER
Oid collation = DEFAULT_COLLATION_OID; /*TODO*/
#endif
if (len == 0)
return pstrdup("");

View File

@ -287,7 +287,6 @@ static TParser *
TParserInit(char *str, int len)
{
TParser *prs = (TParser *) palloc0(sizeof(TParser));
Oid collation = DEFAULT_COLLATION_OID; /*TODO*/
prs->charmaxlen = pg_database_encoding_max_length();
prs->str = str;
@ -300,6 +299,8 @@ TParserInit(char *str, int len)
*/
if (prs->charmaxlen > 1)
{
Oid collation = DEFAULT_COLLATION_OID; /*TODO*/
prs->usewide = true;
if ( lc_ctype_is_c(collation) )
{