Re: Compiler warning

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-08-26T16:08:48Z
Lists: 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



Commits

  1. Suppress compiler warning in non-cassert builds.