# 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
|