1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Clean up compiler warnings from unused variables with asserts disabled

For those variables only used when asserts are enabled, use a new
macro PG_USED_FOR_ASSERTS_ONLY, which expands to
__attribute__((unused)) when asserts are not enabled.
This commit is contained in:
Peter Eisentraut
2012-03-21 23:30:14 +02:00
parent 621eb156f1
commit 0e85abd658
15 changed files with 29 additions and 19 deletions

View File

@ -685,7 +685,7 @@ LruInsert(File file)
/* seek to the right position */
if (vfdP->seekPos != (off_t) 0)
{
off_t returnValue;
off_t returnValue PG_USED_FOR_ASSERTS_ONLY;
returnValue = lseek(vfdP->fd, vfdP->seekPos, SEEK_SET);
Assert(returnValue != (off_t) -1);