Avoid possibly-unportable initializer, per buildfarm warning.
authorTom Lane
Sun, 15 Jul 2007 22:57:48 +0000 (22:57 +0000)
committerTom Lane
Sun, 15 Jul 2007 22:57:48 +0000 (22:57 +0000)
contrib/tsearch2/dict_thesaurus.c

index b61c149aff149e08dad4daf069e2fd8bfb384b36..cb5d9cbb7841d80c3a460645e4b5bcb898cab826 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.8 2007/02/01 19:10:23 momjian Exp $ */
+/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.9 2007/07/15 22:57:48 tgl Exp $ */
 
 /*
  * thesaurus
@@ -696,11 +696,14 @@ thesaurus_init(PG_FUNCTION_ARGS)
 static LexemeInfo *
 findTheLexeme(DictThesaurus * d, char *lexeme)
 {
-   TheLexeme   key = {lexeme, NULL}, *res;
+   TheLexeme   key, *res;
 
    if (d->nwrds == 0)
        return NULL;
 
+   key.lexeme = lexeme;
+   key.entries = NULL;
+
    res = bsearch(&key, d->wrds, d->nwrds, sizeof(TheLexeme), cmpLexemeQ);
 
    if (res == NULL)