From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 13 of 18] tools/xenpaging: fix build errors caused by -Werror Date: Mon, 02 Apr 2012 22:15:36 +0200 Message-ID: <1a0b5c53a3da2a47a98e.1333397736@probook.site> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Olaf Hering # Date 1333397571 -7200 # Node ID 1a0b5c53a3da2a47a98ec093b296616c4b22d810 # Parent 5d89ebdf878b8b0647a688d0ef938bb933772d86 tools/xenpaging: fix build errors caused by -Werror -O2 -Wall -Werror triggers these warnings: xenpaging.c: In function 'xenpaging_init': xenpaging.c:284: warning: unused variable 'p' xenpaging.c: In function 'xenpaging_evict_page': xenpaging.c:606: warning: unused variable 'domctl' xenpaging.c: In function 'resume_pages': xenpaging.c:742: warning: unused variable 'xch' xenpaging.c: In function 'evict_pages': xenpaging.c:820: warning: unused variable 'xch' Remove the offending local variables. Signed-off-by: Olaf Hering Acked-by: Ian Jackson diff -r 5d89ebdf878b -r 1a0b5c53a3da tools/xenpaging/xenpaging.c --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -279,7 +279,6 @@ static struct xenpaging *xenpaging_init( xc_domaininfo_t domain_info; xc_interface *xch = NULL; xentoollog_logger *dbg = NULL; - char *p; int rc; unsigned long ring_pfn, mmap_pfn; @@ -601,8 +600,6 @@ static int xenpaging_evict_page(struct x xen_pfn_t victim = gfn; int ret; - DECLARE_DOMCTL; - /* Nominate page */ ret = xc_mem_paging_nominate(xch, paging->mem_event.domain_id, gfn); if ( ret < 0 ) @@ -737,7 +734,6 @@ static int xenpaging_populate_page(struc /* Trigger a page-in for a batch of pages */ static void resume_pages(struct xenpaging *paging, int num_pages) { - xc_interface *xch = paging->xc_handle; int i, num = 0; for ( i = 0; i < paging->max_pages && num < num_pages; i++ ) @@ -815,7 +811,6 @@ static int evict_victim(struct xenpaging */ static int evict_pages(struct xenpaging *paging, int num_pages) { - xc_interface *xch = paging->xc_handle; int rc, slot, num = 0; /* Reuse known free slots */