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

[Xen-devel] [PATCH 41 of 45] gcc-4.6 compile fix: xen/common/tmem_xen.c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 41 of 45] gcc-4.6 compile fix: xen/common/tmem_xen.c
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 19 May 2011 21:06:00 +0200
Delivery-date: Thu, 19 May 2011 12:44:41 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1305832327; l=2101; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=H0RozjKLGLQzRWuAiW97dKWVrNE=; b=K/kXmJTWtbx9p2kGJT6L9Vafla8aJo9O6QvcRNHtVD4IeHEBl8y8kssQEY12gto719x Ah96tCAkh8OmX4UPHHBVf4AAoR0o74fllEPp5Ko05Ax/xAWpAxUXgfZk69aWqvZPFTiR3 8ftpJIZDStI3fZGjNeESMxpcIk109HsV/pE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1305831919@xxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1305831919@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305824430 -7200
# Node ID 881c89e72ed5955fee3bd90bd200e78a41f124db
# Parent  fcc266b4dcc586b1900bcfeb522cf82df7215cf9
gcc-4.6 compile fix: xen/common/tmem_xen.c

tmem_xen.c: In function 'tmh_compress_from_client':
tmem_xen.c:180:9: error: variable 'ret' set but not used 
[-Werror=unused-but-set-variable]
tmem_xen.c: In function 'tmh_decompress_to_client':
tmem_xen.c:240:9: error: variable 'ret' set but not used 
[-Werror=unused-but-set-variable]

tmem_xen.c: In function 'tmh_client_init':
tmem_xen.c:369:10: error: variable 'name' set but not used 
[-Werror=unused-but-set-variable]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r fcc266b4dcc5 -r 881c89e72ed5 xen/common/tmem_xen.c
--- a/xen/common/tmem_xen.c     Thu May 19 19:00:29 2011 +0200
+++ b/xen/common/tmem_xen.c     Thu May 19 19:00:30 2011 +0200
@@ -177,7 +177,7 @@ EXPORT int tmh_copy_from_client(pfp_t *p
 EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn,
     void **out_va, size_t *out_len, void *cli_va)
 {
-    int ret = 0;
+    int ret __attribute__ ((unused));
     unsigned char *dmem = this_cpu(dstmem);
     unsigned char *wmem = this_cpu(workmem);
     pfp_t *cli_pfp = NULL;
@@ -237,7 +237,7 @@ EXPORT int tmh_decompress_to_client(tmem
     pfp_t *cli_pfp = NULL;
     size_t out_len = PAGE_SIZE;
     bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */
-    int ret;
+    int ret __attribute__ ((unused));
 
     if ( !tmemc )
     {
@@ -366,15 +366,17 @@ static void tmh_persistent_pool_page_put
 EXPORT tmh_client_t *tmh_client_init(cli_id_t cli_id)
 {
     tmh_client_t *tmh;
+#ifndef __i386__
     char name[5];
     int i, shift;
+#endif
 
     if ( (tmh = xmalloc(tmh_client_t)) == NULL )
         return NULL;
+#ifndef __i386__
     for (i = 0, shift = 12; i < 4; shift -=4, i++)
         name[i] = (((unsigned short)cli_id >> shift) & 0xf) + '0';
     name[4] = '\0';
-#ifndef __i386__
     tmh->persistent_pool = xmem_pool_create(name, tmh_persistent_pool_page_get,
         tmh_persistent_pool_page_put, PAGE_SIZE, 0, PAGE_SIZE);
     if ( tmh->persistent_pool == NULL )

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

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