Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > The attached applied patch prevents a compiler warning;  the compiler
> > doesn't know about our elog(ERROR) exit case.
> 
> Hmm, I don't like your fix; ISTM it would be better to set the variable
> only in the default: case (or maybe change the "break" for a "return").

Agreed, I used the 'default' idea, attached, applied.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/access/common/reloptions.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/access/common/reloptions.c,v
retrieving revision 1.14
diff -c -c -r1.14 reloptions.c
*** src/backend/access/common/reloptions.c	6 Jan 2009 02:44:17 -0000	1.14
--- src/backend/access/common/reloptions.c	6 Jan 2009 03:10:36 -0000
***************
*** 667,673 ****
  {
  	char	   *value;
  	int			value_len;
! 	bool		parsed = true;  /* quiet compiler */
  	bool		nofree = false;
  
  	if (option->isset && validate)
--- 667,673 ----
  {
  	char	   *value;
  	int			value_len;
! 	bool		parsed;
  	bool		nofree = false;
  
  	if (option->isset && validate)
***************
*** 736,741 ****
--- 736,742 ----
  			break;
  		default:
  			elog(ERROR, "unsupported reloption type %d", option->gen->type);
+ 			parsed = true; /* quiet compiler */
  			break;
  	}
  
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to