WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] A few more gcc4isms

To: Paul Larson <pl@xxxxxxxxxx>
Subject: Re: [Xen-devel] A few more gcc4isms
From: Adam Heath <doogie@xxxxxxxxxxxxx>
Date: Fri, 22 Apr 2005 15:10:10 -0500 (CDT)
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 22 Apr 2005 20:09:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1114200019.6127.139.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1114200019.6127.139.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 22 Apr 2005, Paul Larson wrote:

> Here's a couple more gcc4 cleanups.
> Signed-off-by: Paul Larson <pl@xxxxxxxxxx>
>
> --- xen-unstable/xen/common/grant_table.c2005-04-21 22:14:31.000000000
> -0500
> +++ xen-unstable-fix/xen/common/grant_table.c2005-04-22
> 14:54:34.000000000 -0500@@ -437,7 +437,7 @@ gnttab_map_grant_ref(
>      gnttab_map_grant_ref_t *uop, unsigned int count)
>  {
>      int i, flush = 0;
> -    unsigned long va;
> +    unsigned long va=0;
>
>      for ( i = 0; i < count; i++ )
>          if ( __gnttab_map_grant_ref(&uop[i], &va) == 0 )
> @@ -633,7 +633,7 @@ gnttab_unmap_grant_ref(
>      gnttab_unmap_grant_ref_t *uop, unsigned int count)
>  {
>      int i, flush = 0;
> -    unsigned long va;
> +    unsigned long va=0;
>
>      for ( i = 0; i < count; i++ )
>          if ( __gnttab_unmap_grant_ref(&uop[i], &va) == 0 )
> --

Actually, there's a window here for gcc to grow an extension.

An attribute on the second arg of gnttab_unmap_grant_ref, that says it doesn't
read it, but instead writes a value to it, would allow for these unitialized
warnings to not appear.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>