]> granicus.if.org Git - postgresql/commitdiff
Fix "variable not used" warnings when USE_WIDE_UPPER_LOWER is not
authorBruce Momjian <bruce@momjian.us>
Thu, 10 Feb 2011 21:57:25 +0000 (16:57 -0500)
committerBruce Momjian <bruce@momjian.us>
Thu, 10 Feb 2011 21:58:02 +0000 (16:58 -0500)
defined.

src/backend/tsearch/ts_locale.c
src/backend/tsearch/wparser_def.c

index e42c4734c74ffb81f7a007cf9aea3bbe48d0a4b6..c66f4aa8bfa87ac49dbcbeb08c2b552cef49d3da 100644 (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("");
index 65d0632f9a1307509d70fe871e7952ad715e02ce..3981a50589d6d8b0c34b707587c3f22ef31772c9 100644 (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) )
                {