Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MH4N7-0001WR-L1 for qemu-devel@nongnu.org; Wed, 17 Jun 2009 19:16:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MH4N3-0001SG-CG for qemu-devel@nongnu.org; Wed, 17 Jun 2009 19:16:49 -0400 Received: from [199.232.76.173] (port=40355 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MH4N3-0001SD-6h for qemu-devel@nongnu.org; Wed, 17 Jun 2009 19:16:45 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:39581) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MH4N2-0002Ok-CD for qemu-devel@nongnu.org; Wed, 17 Jun 2009 19:16:44 -0400 From: "Jean-Christophe Dubois" Subject: Re: [Qemu-devel] [PATCH v4] avoid compilation warning/errors on up to date Date: Thu, 18 Jun 2009 01:16:37 +0200 References: <200906172322.35496.jcd@tribudubois.net> <200906180041.31816.jcd@tribudubois.net> <4A39737F.7070101@codemonkey.ws> In-Reply-To: <4A39737F.7070101@codemonkey.ws> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906180116.37819.jcd@tribudubois.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Le jeudi 18 juin 2009 00:51:43 Anthony Liguori, vous avez =C3=A9crit : > Jean-Christophe Dubois wrote: > > Once again, when all warnings are suppressed I doubt anybody will > > volunteer for this boring task. And all future code added to the project > > without system call error check will get unnoticed because you silenced > > GCC. > > > > But at the end it is your call. > > Silencing the warnings !=3D fixing the warnings. Correct. > To fix the warning, the errors have to be dealt with in a graceful way. > This means either propagating the errors and releases any acquired > resources or aborting. Well, I believe my patch is trying to deal with errors in a graceful way an= d=20 releasing acquired resources whenever possible/required (actually, it does = fix=20 a few fd leaks). If you find this is not the case just point me at the faul= ty=20 file and I'll fix it. > It is not an improvement to just add dummy error handling in a few > spots. It does not result in making the code any more robust. I don't think I am doing "dummy" error handling. I have made all the error= =20 handling you requested and more (EINTR error, partial read/write) and tried= to=20 clean resources in an ordered way when I found it was required. And whatever I have added is a lot more robust than what was before. Once=20 again, please just show me where my patch is incorrect and I will fix it.=20 But don't just point at lseek() and friends. There are many of these system= =20 calls that are not handled correctly in the qemu code and I don't think I'l= l=20 fix them all at once. It seems you are thinking my patch is already too big. > > Regards, > > Anthony Liguori > > >> Regards, > >> > >> Anthony Liguori