From: Peter Eisentraut Date: Sun, 27 May 2012 19:35:01 +0000 (+0300) Subject: Suppress -Wunused-result warning about write() X-Git-Tag: REL9_2_BETA2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27314d32a883e3c4667d8249c3d4760fed917a12;p=postgresql Suppress -Wunused-result warning about write() This is related to aa90e148ca70a235897b1227f1a7cd1c66bc5368, but this code is only used under -DLINUX_OOM_ADJ, so it was apparently overlooked then. --- diff --git a/src/backend/postmaster/fork_process.c b/src/backend/postmaster/fork_process.c index ef0f7b1cf5..c99ed43265 100644 --- a/src/backend/postmaster/fork_process.c +++ b/src/backend/postmaster/fork_process.c @@ -87,9 +87,11 @@ fork_process(void) if (fd >= 0) { char buf[16]; + int rc; snprintf(buf, sizeof(buf), "%d\n", LINUX_OOM_ADJ); - (void) write(fd, buf, strlen(buf)); + rc = write(fd, buf, strlen(buf)); + (void) rc; close(fd); } }