From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] adjust assertion in alloc_heap_pages() Date: Thu, 23 Apr 2015 10:07:30 +0100 Message-ID: <5538B652.7080905@citrix.com> References: <5538AB510200007800074F3A@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4171327132859975164==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YlDHM-0006nN-6G for xen-devel@lists.xenproject.org; Thu, 23 Apr 2015 09:18:40 +0000 In-Reply-To: <5538AB510200007800074F3A@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Ian Campbell , Ian Jackson , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org --===============4171327132859975164== Content-Type: multipart/alternative; boundary="------------000800050200030301010401" --------------000800050200030301010401 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 23/04/15 07:20, Jan Beulich wrote: > Older gcc warns (and due to -Werror fails) on this ASSERT() now that > "node" is of unsigned type. Make it more useful at once. > > Signed-off-by: Jan Beulich Coverity-ID: 1055630 Reviewed-by: Andrew Cooper > > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -604,7 +604,7 @@ static struct page_info *alloc_heap_page > } > first_node = node; > > - ASSERT(node >= 0); > + ASSERT(node < MAX_NUMNODES); > ASSERT(zone_lo <= zone_hi); > ASSERT(zone_hi < NR_ZONES); > > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------000800050200030301010401 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 7bit
On 23/04/15 07:20, Jan Beulich wrote:
Older gcc warns (and due to -Werror fails) on this ASSERT() now that
"node" is of unsigned type. Make it more useful at once.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Coverity-ID: 1055630

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>


--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -604,7 +604,7 @@ static struct page_info *alloc_heap_page
     }
     first_node = node;
 
-    ASSERT(node >= 0);
+    ASSERT(node < MAX_NUMNODES);
     ASSERT(zone_lo <= zone_hi);
     ASSERT(zone_hi < NR_ZONES);
 





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

--------------000800050200030301010401-- --===============4171327132859975164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4171327132859975164==--