Content-Length: 270117 | pFad | http://github.com/postgrespro/postgres/commit/c2a465b2c94fb44211c350f73b5a11978d3b4536

24 Suppress -Wunused-result warning about write(). · postgrespro/postgres@c2a465b · GitHub
Skip to content

Commit c2a465b

Browse files
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 52e98d4. Reviewed-by: Tristan Partin, Peter Eisentraut Discussion: https://postgr.es/m/20231206161839.GA2828158%40nathanxps13
1 parent 52e98d4 commit c2a465b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bin/pg_test_fsync/pg_test_fsync.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,14 @@ test_non_sync(void)
598598
static void
599599
signal_cleanup(SIGNAL_ARGS)
600600
{
601+
int rc;
602+
601603
/* Delete the file if it exists. Ignore errors */
602604
if (needs_unlink)
603605
unlink(filename);
604606
/* Finish incomplete line on stdout */
605-
write(STDOUT_FILENO, "\n", 1);
607+
rc = write(STDOUT_FILENO, "\n", 1);
608+
(void) rc; /* silence compiler warnings */
606609
_exit(1);
607610
}
608611

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/c2a465b2c94fb44211c350f73b5a11978d3b4536

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy