From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Robert Haas" <robertmhaas(at)gmail(dot)com> |
Cc: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>,<pgsql(at)j-davis(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: new compiler warnings |
Date: | 2011-10-18 20:14:15 |
Message-ID: | 4E9D97C702000025000421CD@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Unfortunately, whether Tom's right or not, we still don't have a
> solution to the compiler warning.
Would it be too weird to do something like this for each?:
diff --git a/src/backend/utils/error/elog.c
b/src/backend/utils/error/elog.c
index f0b3b1f..bea5489 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -1747,6 +1747,7 @@ write_eventlog(int level, const char *line, int
len)
static void
write_console(const char *line, int len)
{
+ ssize_t rc;
#ifdef WIN32
/*
@@ -1794,7 +1795,12 @@ write_console(const char *line, int len)
*/
#endif
- write(fileno(stderr), line, len);
+ rc = write(fileno(stderr), line, len);
+ if (rc >= 0 && rc != len)
+ {
+ Assert(false);
+ return;
+ }
}
/*
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-10-18 20:27:59 | Re: new compiler warnings |
Previous Message | Tom Lane | 2011-10-18 20:13:16 | Re: new compiler warnings |