Skip to content

Commit 06288d4

Browse files
committed
Suppress compiler warning (xlog_outrec is unused if not WAL_DEBUG).
1 parent 89aafae commit 06288d4

File tree

1 file changed

+6
-2
lines changed
  • src/backend/access/transam

1 file changed

+6
-2
lines changed

src/backend/access/transam/xlog.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.130 2004/01/06 17:26:23 neilc Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.131 2004/01/06 22:22:37 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -455,8 +455,10 @@ static XLogRecord *ReadCheckpointRecord(XLogRecPtr RecPtr,
455455
static void WriteControlFile(void);
456456
static void ReadControlFile(void);
457457
static char *str_time(time_t tnow);
458-
static void xlog_outrec(char *buf, XLogRecord *record);
459458
static void issue_xlog_fsync(void);
459+
#ifdef WAL_DEBUG
460+
static void xlog_outrec(char *buf, XLogRecord *record);
461+
#endif
460462

461463

462464
/*
@@ -3489,6 +3491,7 @@ xlog_desc(char *buf, uint8 xl_info, char *rec)
34893491
strcat(buf, "UNKNOWN");
34903492
}
34913493

3494+
#ifdef WAL_DEBUG
34923495
static void
34933496
xlog_outrec(char *buf, XLogRecord *record)
34943497
{
@@ -3513,6 +3516,7 @@ xlog_outrec(char *buf, XLogRecord *record)
35133516
sprintf(buf + strlen(buf), ": %s",
35143517
RmgrTable[record->xl_rmid].rm_name);
35153518
}
3519+
#endif /* WAL_DEBUG */
35163520

35173521

35183522
/*

0 commit comments

Comments
 (0)