Re: Compiler warning - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Compiler warning
Date
Msg-id 2849063.1598458128@sss.pgh.pa.us
Whole thread Raw
In response to Compiler warning  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Compiler warning
Next
From: Alvaro Herrera
Date:
Subject: Re: LWLockAcquire and LockBuffer mode argument