All of lore.kernel.org
 help / color / mirror / Atom feed
* A few more gcc4isms
@ 2005-04-22 20:00 Paul Larson
  2005-04-22 20:10 ` Adam Heath
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Larson @ 2005-04-22 20:00 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 866 bytes --]

Here's a couple more gcc4 cleanups.
Signed-off-by: Paul Larson <pl@us.ibm.com>

--- 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 )
-- 
Thanks,
Paul Larson
pl@us.ibm.com
IBM Linux Technology Center

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A few more gcc4isms
  2005-04-22 20:00 A few more gcc4isms Paul Larson
@ 2005-04-22 20:10 ` Adam Heath
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Heath @ 2005-04-22 20:10 UTC (permalink / raw)
  To: Paul Larson; +Cc: xen-devel

On Fri, 22 Apr 2005, Paul Larson wrote:

> Here's a couple more gcc4 cleanups.
> Signed-off-by: Paul Larson <pl@us.ibm.com>
>
> --- 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-22 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22 20:00 A few more gcc4isms Paul Larson
2005-04-22 20:10 ` Adam Heath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.