Re: Compiler warning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiler warning
Date: 2020-08-26 16:08:48
Message-ID: 2849063.1598458128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> I see a compiler warning on git master:
> sharedfileset.c:288:8: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]

Could get rid of the variable entirely: change the "break" to "return"
and then the final Assert can be "Assert(false)".

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-08-26 16:27:19 Re: LWLockAcquire and LockBuffer mode argument
Previous Message Bruce Momjian 2020-08-26 16:02:51 Compiler warning