SHA256
1
0
forked from pool/xen
xen/xen-warnings-unused.diff
Charles Arnold 17854f1c81 - Upstream patches from Jan
25833-32on64-bogus-pt_base-adjust.patch                                                                                                                
  25835-adjust-rcu-lock-domain.patch                                                                                                                     
  25836-VT-d-S3-MSI-resume.patch                                                                                                                         
  25850-tmem-xsa-15-1.patch                                                                                                                              
  25851-tmem-xsa-15-2.patch                                                                                                                              
  25852-tmem-xsa-15-3.patch                                                                                                                              
  25853-tmem-xsa-15-4.patch                                                                                                                              
  25854-tmem-xsa-15-5.patch                                                                                                                              
  25855-tmem-xsa-15-6.patch                                                                                                                              
  25856-tmem-xsa-15-7.patch                                                                                                                              
  25857-tmem-xsa-15-8.patch                                                                                                                              
  25858-tmem-xsa-15-9.patch                                                                                                                              
  25859-tmem-missing-break.patch                                                                                                                         
  25860-tmem-cleanup.patch                                                                                                                               
  25861-x86-early-fixmap.patch                                                                                                                           
  25862-sercon-non-com.patch                                                                                                                             
  25863-sercon-ehci-dbgp.patch                                                                                                                           
  25864-sercon-unused.patch                                                                                                                              
  25866-sercon-ns16550-pci-irq.patch                                                                                                                     
  25867-sercon-ns16550-parse.patch                                                                                                                       
  25874-x86-EFI-chain-cfg.patch                                                                                                                          
  25909-xenpm-consistent.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=201
2012-09-21 14:45:08 +00:00

343 lines
11 KiB
Diff

--- a/tools/misc/gtraceview.c
+++ b/tools/misc/gtraceview.c
@@ -621,7 +621,8 @@ void crt_init(void)
void nr_addch(int nr, int ch)
{
int i;
- int y, x;
+ int x;
+ int __attribute__((__unused__)) y;
getyx(stdscr, y, x);
for (i = 0; i < nr; i++) {
if (x == COLS-1)
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -19,7 +19,8 @@ int
main(int argc, char **argv)
{
unsigned int domid, store_evtchn, console_evtchn;
- unsigned int hvm, pae, apic;
+ unsigned int hvm, pae;
+ unsigned int __attribute__((__unused__)) apic;
xc_interface *xch;
int io_fd, ret;
int superpages;
--- a/tools/firmware/rombios/32bit/tcgbios/tcgbios.c
+++ b/tools/firmware/rombios/32bit/tcgbios/tcgbios.c
@@ -1064,7 +1064,7 @@ uint32_t HashLogEvent32(struct hlei *hle
uint32_t rc = 0;
uint16_t size;
uint32_t logdataptr;
- uint32_t logdatalen;
+ uint32_t __attribute__((__unused__)) logdatalen;
uint32_t hashdataptr;
uint32_t hashdatalen;
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -277,7 +277,8 @@ int main(int argc, char **argv)
};
char *dom_path = NULL, *path = NULL;
- int spty, xsfd;
+ int spty;
+ int __attribute__((__unused__)) xsfd;
struct xs_handle *xs;
char *end;
console_type type = CONSOLE_INVAL;
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -278,7 +278,8 @@ static void fail(const char *str)
/* Return the row containing the cursor. */
static int current_row(void)
{
- int y, x;
+ int __attribute__((__unused__)) x;
+ int y;
getyx(stdscr, y, x);
return y;
}
@@ -286,7 +287,8 @@ static int current_row(void)
/* Return the number of lines on the screen. */
static int lines(void)
{
- int y, x;
+ int __attribute__((__unused__)) x;
+ int y;
getmaxyx(stdscr, y, x);
return y;
}
--- a/tools/libxl/libxlu_cfg.c
+++ b/tools/libxl/libxlu_cfg.c
@@ -406,7 +406,7 @@ char *xlu__cfgl_dequote(CfgParseContext
#define NUMERIC_CHAR(minlen,maxlen,base,basetext) do{ \
char numbuf[(maxlen)+1], *ep; \
- unsigned long val; \
+ unsigned long __attribute__((__unused__)) val; \
\
strncpy(numbuf,p,(maxlen)); \
numbuf[(maxlen)]= 0; \
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -71,7 +71,7 @@ int libxl__create_pci_backend(libxl__gc
flexarray_t *front = NULL;
flexarray_t *back = NULL;
libxl__device device;
- int ret = ERROR_NOMEM, i;
+ int i;
front = flexarray_make(16, 1);
if (!front)
@@ -80,8 +80,6 @@ int libxl__create_pci_backend(libxl__gc
if (!back)
goto out;
- ret = 0;
-
LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Creating pci backend");
/* add pci device */
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -565,7 +565,6 @@ int libxl__build_hvm(libxl__gc *gc, uint
LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "hvm build set params failed");
goto out;
}
- rc = 0;
out:
return rc;
}
--- a/tools/debugger/gdbsx/gx/gx_comm.c
+++ b/tools/debugger/gdbsx/gx/gx_comm.c
@@ -163,7 +163,7 @@ readchar(void)
static char buf[BUFSIZ];
static int bufcnt = 0;
static char *bufp;
- uint64_t ll;
+ uint64_t __attribute__((__unused__)) ll;
if (bufcnt-- > 0)
return *bufp++ & 0x7f;
--- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
+++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
@@ -836,7 +836,7 @@ static int create_suspend_thread(checkpo
static void stop_suspend_thread(checkpoint_state* s)
{
- int err;
+ int __attribute__((__unused__)) err;
s->done = 1;
--- a/tools/python/xen/lowlevel/netlink/libnetlink.c
+++ b/tools/python/xen/lowlevel/netlink/libnetlink.c
@@ -433,7 +433,8 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt
nladdr.nl_groups = 0;
while (1) {
- int err, len, type;
+ int err, len;
+ int __attribute__((__unused__)) type;
int l;
status = fread(&buf, 1, sizeof(*h), rtnl);
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -371,7 +371,7 @@ int cpupool_add_domain(struct domain *d,
{
struct cpupool *c;
int rc;
- int n_dom = 0;
+ int __attribute__((__unused__)) n_dom = 0;
if ( poolid == CPUPOOLID_NONE )
return 0;
@@ -399,8 +399,8 @@ int cpupool_add_domain(struct domain *d,
*/
void cpupool_rm_domain(struct domain *d)
{
- int cpupool_id;
- int n_dom;
+ int __attribute__((__unused__)) cpupool_id;
+ int __attribute__((__unused__)) n_dom;
if ( d->cpupool == NULL )
return;
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -817,7 +817,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v
{
xen_kexec_exec_t exec;
xen_kexec_image_t *image;
- int base, bit, pos, ret = -EINVAL;
+ int base, bit, pos;
+ int __attribute__((__unused__)) ret = -EINVAL;
if ( unlikely(copy_from_guest(&exec, uarg, 1)) )
return -EFAULT;
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1012,7 +1012,8 @@ static void local_time_calibration(void)
* System timestamps, extrapolated from local and master oscillators,
* taken during this calibration and the previous calibration.
*/
- s_time_t prev_local_stime, curr_local_stime;
+ s_time_t curr_local_stime;
+ s_time_t __attribute__((__unused__)) prev_local_stime;
s_time_t prev_master_stime, curr_master_stime;
/* TSC timestamps taken during this calibration and prev calibration. */
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -483,7 +483,7 @@ p2m_remove_page(struct p2m_domain *p2m,
unsigned int page_order)
{
unsigned long i;
- mfn_t mfn_return;
+ mfn_t __attribute__((__unused__)) mfn_return;
p2m_type_t t;
p2m_access_t a;
--- a/xen/arch/x86/cpu/intel_cacheinfo.c
+++ b/xen/arch/x86/cpu/intel_cacheinfo.c
@@ -169,7 +169,8 @@ unsigned int __cpuinit init_intel_cachei
unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */
unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */
- unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb;
+ unsigned int num_threads_sharing, index_msb;
+ unsigned int __attribute__((__unused__)) l2_id = 0, l3_id = 0;
if (c->cpuid_level > 3) {
static int is_initialized;
--- a/xen/arch/x86/hvm/viridian.c
+++ b/xen/arch/x86/hvm/viridian.c
@@ -317,7 +317,7 @@ int rdmsr_viridian_regs(uint32_t idx, ui
int viridian_hypercall(struct cpu_user_regs *regs)
{
int mode = hvm_guest_x86_mode(current);
- unsigned long input_params_gpa, output_params_gpa;
+ unsigned long __attribute__((__unused__)) input_params_gpa, output_params_gpa;
uint16_t status = HV_STATUS_SUCCESS;
union hypercall_input {
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4973,7 +4973,7 @@ static int ptwr_emulated_update(
{
unsigned long mfn;
unsigned long unaligned_addr = addr;
- struct page_info *page;
+ struct page_info __attribute__((__unused__)) *page;
l1_pgentry_t pte, ol1e, nl1e, *pl1e;
struct vcpu *v = current;
struct domain *d = v->domain;
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1352,7 +1352,8 @@ obj_unlock:
static int tmem_evict(void)
{
client_t *client = tmh_client_from_current();
- pgp_t *pgp = NULL, *pgp2, *pgp_del;
+ pgp_t *pgp = NULL, *pgp2;
+ pgp_t __attribute__((__unused__)) *pgp_del;
obj_t *obj;
pool_t *pool;
int ret = 0;
@@ -1589,7 +1590,8 @@ static NOINLINE int do_tmem_put(pool_t *
pagesize_t pfn_offset, pagesize_t len, tmem_cli_va_t clibuf)
{
obj_t *obj = NULL, *objfound = NULL, *objnew = NULL;
- pgp_t *pgp = NULL, *pgpdel = NULL;
+ pgp_t *pgp = NULL;
+ pgp_t __attribute__((__unused__)) *pgpdel = NULL;
client_t *client = pool->client;
int ret = client->frozen ? -EFROZEN : -ENOMEM;
--- a/xen/common/tmem_xen.c
+++ b/xen/common/tmem_xen.c
@@ -196,7 +196,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, tmem_cli_va_t clibuf)
{
- int ret = 0;
+ int __attribute__((__unused__)) ret = 0;
unsigned char *dmem = this_cpu(dstmem);
unsigned char *wmem = this_cpu(workmem);
char *scratch = this_cpu(scratch_page);
@@ -272,7 +272,7 @@ EXPORT int tmh_decompress_to_client(tmem
void *cli_va = NULL;
char *scratch = this_cpu(scratch_page);
size_t out_len = PAGE_SIZE;
- int ret;
+ int __attribute__((__unused__)) ret;
if ( guest_handle_is_null(clibuf) )
{
@@ -405,15 +405,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 )
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -124,7 +124,7 @@ set_shadow_status(struct vcpu *v, mfn_t
/* Put a shadow into the hash table */
{
struct domain *d = v->domain;
- int res;
+ int __attribute__((__unused__)) res;
SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n",
d->domain_id, v->vcpu_id, mfn_x(gmfn),
@@ -4438,7 +4438,7 @@ sh_update_cr3(struct vcpu *v, int do_loc
int sh_rm_write_access_from_sl1p(struct vcpu *v, mfn_t gmfn,
mfn_t smfn, unsigned long off)
{
- int r;
+ int __attribute__((__unused__)) r;
shadow_l1e_t *sl1p, sl1e;
struct page_info *sp;
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -377,8 +377,7 @@ int __init construct_dom0(
return rc;
/* compatibility check */
- compatible = 0;
- compat32 = 0;
+ compatible = compat32 = 0;
machine = elf_uval(&elf, elf.ehdr, e_machine);
switch (CONFIG_PAGING_LEVELS) {
case 3: /* x86_32p */
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1910,7 +1910,11 @@ static int emulate_privileged_op(struct
struct vcpu *v = current;
unsigned long *reg, eip = regs->eip;
u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 0;
+#ifdef CONFIG_X86_64
enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none;
+#else
+ enum { lm_seg_none, lm_seg_fs, lm_seg_gs } __attribute__((__unused__)) lm_ovr = lm_seg_none;
+#endif
int rc;
unsigned int port, i, data_sel, ar, data, bpmatch = 0;
unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 0;