From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:38035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggXU5-0004h6-Al for qemu-devel@nongnu.org; Mon, 07 Jan 2019 11:10:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggXU4-0000zm-I9 for qemu-devel@nongnu.org; Mon, 07 Jan 2019 11:10:37 -0500 Date: Mon, 7 Jan 2019 17:10:29 +0100 From: Cornelia Huck Message-ID: <20190107171029.35418046.cohuck@redhat.com> In-Reply-To: References: <20190103151612.51399-1-liq3ea@163.com> <20190104151005.42b6f111.cohuck@redhat.com> <5C2F6ED2.33D0D1.16460@m12-13.163.com> <20190107164801.32e9d6dc.cohuck@redhat.com> <20190107165748.442cc0c1.cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] s390: avoid potential null dereference ins390_pcihost_unplug() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Li Qiang , "walling@linux.ibm.com" , "rth@twiddle.net" , "david@redhat.com" , "pasic@linux.ibm.com" , "borntraeger@de.ibm.com" , "qemu-s390x@nongnu.org" , "qemu-devel@nongnu.org" On Mon, 7 Jan 2019 16:04:35 +0000 Peter Maydell wrote: > On Mon, 7 Jan 2019 at 15:57, Cornelia Huck wrote: > > On Mon, 7 Jan 2019 15:54:21 +0000 > > Peter Maydell wrote: > > > On Mon, 7 Jan 2019 at 15:48, Cornelia Huck wrote: > > > > Sounds good. But please return anyway in the unplug case, so that the > > > > code is fine if asserts have been configured out. > > > > > > Hopefully that won't cause the compiler to complain about > > > unreachable code :-) > > > > BTW: Is there a common configuration where asserts are configured out? > > Not that this is an accident waiting to happen... > > No -- we insist they are always enabled, and osdep.h will #error > out if either NDEBUG or G_DISABLE_ASSERT are set. Ah, now I remember (I thought we still had that problem.) In that case, no return is needed.