Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2a465b

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 certaincompilers make that harder than it ought to be.This was missed in commit52e98d4.Reviewed-by: Tristan Partin, Peter EisentrautDiscussion:https://postgr.es/m/20231206161839.GA2828158%40nathanxps13
1 parent52e98d4 commitc2a465b

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
staticvoid
599599
signal_cleanup(SIGNAL_ARGS)
600600
{
601+
intrc;
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)

[8]ページ先頭

©2009-2025 Movatter.jp