From 135724ec357f9b9c8800567444724c72da2cc6be Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 10 Feb 2011 16:57:25 -0500 Subject: [PATCH] Fix "variable not used" warnings when USE_WIDE_UPPER_LOWER is not defined. --- src/backend/tsearch/ts_locale.c | 2 ++ src/backend/tsearch/wparser_def.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/tsearch/ts_locale.c b/src/backend/tsearch/ts_locale.c index e42c4734c7..c66f4aa8bf 100644 --- a/src/backend/tsearch/ts_locale.c +++ b/src/backend/tsearch/ts_locale.c @@ -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(""); diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparser_def.c index 65d0632f9a..3981a50589 100644 --- a/src/backend/tsearch/wparser_def.c +++ b/src/backend/tsearch/wparser_def.c @@ -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) ) { -- 2.40.0