Suppress unused-variable warnings when building without Asserts.

This commit is contained in:
Tom Lane 2003-08-08 14:39:45 +00:00
parent f65643771b
commit 870886affe
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.4 2003/08/04 00:43:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.5 2003/08/08 14:39:45 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -742,7 +742,9 @@ SimpleLruSetLatestPage(SlruCtl ctl, int pageno)
void void
SimpleLruFlush(SlruCtl ctl, bool checkpoint) SimpleLruFlush(SlruCtl ctl, bool checkpoint)
{ {
#ifdef USE_ASSERT_CHECKING /* only used in Assert() */
SlruShared shared = (SlruShared) ctl->shared; SlruShared shared = (SlruShared) ctl->shared;
#endif
int slotno; int slotno;
LWLockAcquire(ctl->locks->ControlLock, LW_EXCLUSIVE); LWLockAcquire(ctl->locks->ControlLock, LW_EXCLUSIVE);

View File

@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.25 2003/08/04 02:39:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.26 2003/08/08 14:39:45 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -196,7 +196,9 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
for (attrno = 1; attrno <= numattrs; attrno++) for (attrno = 1; attrno <= numattrs; attrno++)
{ {
#ifdef USE_ASSERT_CHECKING /* only used in Assert() */
Form_pg_attribute att_tup = tupdesc->attrs[attrno - 1]; Form_pg_attribute att_tup = tupdesc->attrs[attrno - 1];
#endif
Var *var; Var *var;
if (tlist == NIL) if (tlist == NIL)