Add (void) cast in front of rmtree() call at the end of pg_upgrade

Most calls of rmtree() report an error, and the code coming from 38bfae3
has introduced one caller where this is not done.  The previous behavior
was to not fail hard if any log file generated is not properly unlinked
when cleaning up the contents generated once the upgrade has completed,
so add a cast to (void) to indicate the intention behind this new code.

Per gripe from Coverity.
pull/77/head
Michael Paquier 4 years ago
parent 38bfae3652
commit 42a9e88bf6
  1. 2
      src/bin/pg_upgrade/pg_upgrade.c

@ -754,5 +754,5 @@ cleanup(void)
/* Remove dump and log files? */
if (!log_opts.retain)
rmtree(log_opts.basedir, true);
(void) rmtree(log_opts.basedir, true);
}

Loading…
Cancel
Save