stupid dmd warnings are useless

This commit is contained in:
Adam D. Ruppe 2019-03-07 22:23:51 -05:00
parent 0c328aa3b0
commit b3df2871d2
1 changed files with 12 additions and 11 deletions

23
cgi.d
View File

@ -5134,19 +5134,20 @@ interface EventSourceServer {
version(fastcgi) version(fastcgi)
throw new Exception("sending fcgi connections not supported"); throw new Exception("sending fcgi connections not supported");
else {
auto fd = cgi.getOutputFileHandle();
if(isInvalidHandle(fd))
throw new Exception("bad fd from cgi!");
auto fd = cgi.getOutputFileHandle(); EventSourceServerImplementation.SendableEventConnection sec;
if(isInvalidHandle(fd)) sec.populate(cgi.responseChunked, eventUrl, lastEventId);
throw new Exception("bad fd from cgi!");
EventSourceServerImplementation.SendableEventConnection sec; version(Posix) {
sec.populate(cgi.responseChunked, eventUrl, lastEventId); auto res = write_fd(s, cast(void*) &sec, sec.sizeof, fd);
assert(res == sec.sizeof);
version(Posix) { } else version(Windows) {
auto res = write_fd(s, cast(void*) &sec, sec.sizeof, fd); // FIXME
assert(res == sec.sizeof); }
} else version(Windows) {
// FIXME
} }
} }