Обсуждение: Compiler warning

Поиск
Список
Период
Сортировка

Compiler warning

От
Bruce Momjian
Дата:
I see a compiler warning on git master:

   sharedfileset.c:288:8: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




Re: Compiler warning

От
Tom Lane
Дата:
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