From: "Jan Beulich" Subject: Re: [PATCH v1 3/3] blktap2: Silence warnings under GCC 5.1.1 Date: Mon, 05 Oct 2015 08:46:03 -0600 Message-ID: <5612A94B02000078000A8330@prv-mh.provo.novell.com> References: <1443897590-5663-1-git-send-email-konrad.wilk@oracle.com> <1443897590-5663-4-git-send-email-konrad.wilk@oracle.com> <56123983.5040406@citrix.com> <5612713F02000078000A80E9@prv-mh.provo.novell.com> <20151005142648.GF2256@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zj71o-0003eM-Ke for xen-devel@lists.xenproject.org; Mon, 05 Oct 2015 14:46:12 +0000 In-Reply-To: <20151005142648.GF2256@l.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: keir@xen.org, ian.campbell@citrix.com, Andrew Cooper , tim@xen.org, xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 05.10.15 at 16:26, wrote: > On Mon, Oct 05, 2015 at 04:46:55AM -0600, Jan Beulich wrote: >> >>> On 05.10.15 at 10:49, wrote: >> > On 03/10/15 19:39, Konrad Rzeszutek Wilk wrote: >> >> I get compile warnings telling me that >> >> s->connections[i].fd == fd >> >> >> >> 'i' may be past the array. Adding in an extra condition >> >> on the loop fixes that. >> >> >> >> Signed-off-by: Konrad Rzeszutek Wilk >> > >> > Reviewed-by: Andrew Cooper >> > >> > Furthermore, I can't see any logic which prevents s->connected getting >> > larger than MAX_CONNECTIONS >> >> Iirc Olaf had already suggested such a patch quite some time ago, >> and not having seen the point back then I also don't see the point >> now: ctl_accept() prevents ->connected from growing beyond 1, >> and there's no other place where the value could get incremented. > > Thoughts on what to do about the compiler warnings which make this > compiler errors (since we compile with -Werror) and one can't > compile Xen? A different fix (make s->connected not be an array?) To be honest I think this needs to be taken care of at the compiler side, as I can't see any reason for the warning. The workaround therefore would be to suppress the warning via -Wno-* until the compiler side would get fixed. (Of course I'm open to be convinced otherwise, i.e. this not being a compiler issue.) >> Also, Konrad, regarding the subject (since this repeats from an >> earlier patch of yours) - why do you reference a specific, non- >> release version of gcc? Why not simply say 5.x? Because if the >> problem is indeed only present in a non-release version, I don't >> think we should bother working around such issues. > > I just ran 'gcc --version' and that is what it spit out. Since > it is part of an official Fedora release I figured it is 'released' > in some way? Well, if my understanding of gcc's new versioning is correct, only .. with y > 0 and z == 0 are released versions. 5.1.1 would be an RC for 5.2.0 (which already got released). Jan