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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy