Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Avoid possibly-unportable initializer, per buildfarm warning.

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)postgresql(dot)org>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Avoid possibly-unportable initializer, per buildfarm warning.
Date: 2007-09-17 13:32:14
Message-ID: 87hclto1sx.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-patches
"Tom Lane" <tgl(at)postgresql(dot)org> writes:

> Log Message:
> -----------
> Avoid possibly-unportable initializer, per buildfarm warning.

This was lost in the tsearch2 merge.



Index: src/backend/tsearch/dict_thesaurus.c
===================================================================
RCS file: /home/stark/src/REPOSITORY/pgsql/src/backend/tsearch/dict_thesaurus.c,v
retrieving revision 1.3
diff -c -r1.3 dict_thesaurus.c
*** src/backend/tsearch/dict_thesaurus.c	25 Aug 2007 00:03:59 -0000	1.3
--- src/backend/tsearch/dict_thesaurus.c	17 Sep 2007 13:30:27 -0000
***************
*** 653,663 ****
  static LexemeInfo *
  findTheLexeme(DictThesaurus * d, char *lexeme)
  {
! 	TheLexeme	key = {lexeme, NULL}, *res;
  
  	if (d->nwrds == 0)
  		return NULL;
  
  	res = bsearch(&key, d->wrds, d->nwrds, sizeof(TheLexeme), cmpLexemeQ);
  
  	if (res == NULL)
--- 653,666 ----
  static LexemeInfo *
  findTheLexeme(DictThesaurus * d, char *lexeme)
  {
! 	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)

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

In response to

pgsql-committers by date

Next:From: Tom LaneDate: 2007-09-17 13:33:17
Subject: Re: pgsql: Fix a portability bug (ye olde not casting a <ctype.h> argument
Previous:From: Markus SchiltknechtDate: 2007-09-17 13:21:38
Subject: Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable

pgsql-patches by date

Next:From: Tom LaneDate: 2007-09-17 14:03:08
Subject: Re: HOT synced with HEAD
Previous:From: Pavan DeolaseeDate: 2007-09-17 07:32:43
Subject: Re: HOT synced with HEAD

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group