11 messages in ru.sysoev.nginxRe: Compilation errors on Ubuntu 8.10...
FromSent OnAttachments
Eric BensonNov 10, 2008 9:38 am.log, .diff
Igor SysoevNov 10, 2008 12:34 pm.Other
Eric BensonNov 10, 2008 1:25 pm 
Maxim DouninNov 10, 2008 1:35 pm 
Igor SysoevNov 10, 2008 1:43 pm 
Eric BensonNov 10, 2008 2:27 pm 
Maxim DouninNov 10, 2008 3:47 pm 
Maxim DouninNov 10, 2008 4:29 pm.txt
Igor SysoevNov 10, 2008 10:35 pm.Other
Eric BensonNov 10, 2008 11:24 pm 
mikeNov 10, 2008 11:33 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Compilation errors on Ubuntu 8.10 Intrepid IbexActions...
From:Eric Benson (eric@yahoo.com)
Date:Nov 10, 2008 1:25:43 pm
List:ru.sysoev.nginx

Unfortunately the direct cast to void doesn't suppress the warning. I tried that
first before using the variable assignment (which then required a cast to void
to avoid an unused variable warning!)

Ideally, you should actually check the return value to make sure there wasn't an
error (-1 returned) or an incomplete write (the number of bytes written is less
than the count argument).

----- Original Message ---- From: Igor Sysoev <is@rambler-co.ru> To: ngi@sysoev.ru Sent: Monday, November 10, 2008 12:34:37 PM Subject: Re: Compilation errors on Ubuntu 8.10 Intrepid Ibex

On Mon, Nov 10, 2008 at 09:38:39AM -0800, Eric Benson wrote:

Compiling either 0.6.32 or 0.7.20 on a new Ubuntu 8.10 installation with gcc
4.3.2 causes errors due to a new compiler warning (when combined with the use of
-Werror in CFLAGS). There is now a compiler warning when the return value of
write() is ignored. This causes errors in a number of placees in nginx. I have
included a log showing the compiler output as well as a patch file showing the
changes I made to avoid these errors.

Thank you. However, there is more elegant way to suppress this warning without stub variables:

(void) write_fd(...)

Could you test the attached patch ?