diff options
author | Nathan Bossart <nathan@postgresql.org> | 2023-12-06 17:16:57 -0600 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2023-12-06 17:16:57 -0600 |
commit | c2a465b2c94fb44211c350f73b5a11978d3b4536 (patch) | |
tree | 81caf1efbc3be4b57d341bc8e76e25f4e137e894 | |
parent | 52e98d45023027de0fa8e4eee2d53e2c20185812 (diff) | |
download | postgresql-c2a465b2c94fb44211c350f73b5a11978d3b4536.tar.gz postgresql-c2a465b2c94fb44211c350f73b5a11978d3b4536.zip |
Suppress -Wunused-result warning about write().
pg_test_fsync's signal_cleanup() intentionally ignores the write()
result since there's not much we could do about it, but certain
compilers make that harder than it ought to be.
This was missed in commit 52e98d4502.
Reviewed-by: Tristan Partin, Peter Eisentraut
Discussion: https://postgr.es/m/20231206161839.GA2828158%40nathanxps13
-rw-r--r-- | src/bin/pg_test_fsync/pg_test_fsync.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/pg_test_fsync/pg_test_fsync.c b/src/bin/pg_test_fsync/pg_test_fsync.c index f109aa57174..54bc0767f18 100644 --- a/src/bin/pg_test_fsync/pg_test_fsync.c +++ b/src/bin/pg_test_fsync/pg_test_fsync.c @@ -598,11 +598,14 @@ test_non_sync(void) static void signal_cleanup(SIGNAL_ARGS) { + int rc; + /* Delete the file if it exists. Ignore errors */ if (needs_unlink) unlink(filename); /* Finish incomplete line on stdout */ - write(STDOUT_FILENO, "\n", 1); + rc = write(STDOUT_FILENO, "\n", 1); + (void) rc; /* silence compiler warnings */ _exit(1); } |