Add (void) cast in front of rmtree() call at the end of pg_upgrade
authorMichael Paquier <michael@paquier.xyz>
Mon, 7 Feb 2022 05:19:52 +0000 (14:19 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 7 Feb 2022 05:19:52 +0000 (14:19 +0900)
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.

src/bin/pg_upgrade/pg_upgrade.c

index 48a54170a72b348c771aeca6aa176f890cce6a63..77beb116398a7992e81156a2bff366cae710b032 100644 (file)
@@ -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);
 }