Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 870886a

Browse files
committed
Suppress unused-variable warnings when building without Asserts.
1 parent f656437 commit 870886a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/backend/access/transam/slru.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.4 2003/08/04 00:43:15 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.5 2003/08/08 14:39:45 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -742,7 +742,9 @@ SimpleLruSetLatestPage(SlruCtl ctl, int pageno)
742742
void
743743
SimpleLruFlush(SlruCtl ctl, bool checkpoint)
744744
{
745+
#ifdef USE_ASSERT_CHECKING /* only used in Assert() */
745746
SlruShared shared = (SlruShared) ctl->shared;
747+
#endif
746748
int slotno;
747749

748750
LWLockAcquire(ctl->locks->ControlLock, LW_EXCLUSIVE);

src/backend/executor/execScan.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.25 2003/08/04 02:39:58 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.26 2003/08/08 14:39:45 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -196,7 +196,9 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
196196

197197
for (attrno = 1; attrno <= numattrs; attrno++)
198198
{
199+
#ifdef USE_ASSERT_CHECKING /* only used in Assert() */
199200
Form_pg_attribute att_tup = tupdesc->attrs[attrno - 1];
201+
#endif
200202
Var *var;
201203

202204
if (tlist == NIL)

0 commit comments

Comments
 (0)