Suppress -Wunused-result warning about write()
authorPeter Eisentraut
Sun, 27 May 2012 19:35:01 +0000 (22:35 +0300)
committerPeter Eisentraut
Sun, 27 May 2012 19:35:01 +0000 (22:35 +0300)
This is related to aa90e148ca70a235897b1227f1a7cd1c66bc5368, but this
code is only used under -DLINUX_OOM_ADJ, so it was apparently
overlooked then.

src/backend/postmaster/fork_process.c

index ef0f7b1cf5fbde2b69bc6fabd0a32eccd041c97e..c99ed4326555597b95f6a5f9e4749e2d16820a63 100644 (file)
@@ -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);
            }
        }