From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@novell.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] fix gcc-4.6's set-but-not-used warnings
Date: Thu, 25 Aug 2011 15:39:03 +0100 [thread overview]
Message-ID: <CA7C1D17.1FC04%keir.xen@gmail.com> (raw)
In-Reply-To: <4E56766B0200007800053408@nat28.tlf.novell.com>
On 25/08/2011 15:20, "Jan Beulich" <JBeulich@novell.com> wrote:
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
But we compile with -Wno-unused-but-set-variable?
> --- a/xen/arch/x86/cpu/intel_cacheinfo.c
> +++ b/xen/arch/x86/cpu/intel_cacheinfo.c
> @@ -170,7 +170,6 @@ 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;
>
> if (c->cpuid_level > 3) {
> static int is_initialized;
> @@ -203,15 +202,9 @@ unsigned int __cpuinit init_intel_cachei
> break;
> case 2:
> new_l2 = this_leaf.size/1024;
> - num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing;
> - index_msb = get_count_order(num_threads_sharing);
> - l2_id = c->apicid >> index_msb;
> break;
> case 3:
> new_l3 = this_leaf.size/1024;
> - num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing;
> - index_msb = get_count_order(num_threads_sharing);
> - l3_id = c->apicid >> index_msb;
> break;
> default:
> break;
> --- a/xen/arch/x86/hvm/emulate.c
> +++ b/xen/arch/x86/hvm/emulate.c
> @@ -58,11 +58,10 @@ static int hvmemul_do_io(
> ioreq_t *p = get_ioreq(curr);
> unsigned long ram_gfn = paddr_to_pfn(ram_gpa);
> p2m_type_t p2mt;
> - mfn_t ram_mfn;
> int rc;
>
> /* Check for paged out page */
> - ram_mfn = gfn_to_mfn_unshare(curr->domain, ram_gfn, &p2mt);
> + gfn_to_mfn_unshare(curr->domain, ram_gfn, &p2mt);
> if ( p2m_is_paging(p2mt) )
> {
> p2m_mem_paging_populate(curr->domain, ram_gfn);
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -3782,8 +3782,8 @@ long do_hvm_op(unsigned long op, XEN_GUE
> {
> p2m_type_t t;
> p2m_type_t nt;
> - mfn_t mfn;
> - mfn = gfn_to_mfn_unshare(d, pfn, &t);
> +
> + gfn_to_mfn_unshare(d, pfn, &t);
> if ( p2m_is_paging(t) )
> {
> p2m_mem_paging_populate(d, pfn);
> --- a/xen/arch/x86/hvm/viridian.c
> +++ b/xen/arch/x86/hvm/viridian.c
> @@ -323,6 +323,9 @@ int viridian_hypercall(struct cpu_user_r
> status = HV_STATUS_SUCCESS;
> break;
> default:
> + /* Silence compiler warnings. */
> + (void)input_params_gpa;
> + (void)output_params_gpa;
> status = HV_STATUS_INVALID_HYPERCALL_CODE;
> break;
> }
> --- a/xen/arch/x86/mm/p2m-pod.c
> +++ b/xen/arch/x86/mm/p2m-pod.c
> @@ -1078,7 +1078,6 @@ guest_physmap_mark_populate_on_demand(st
> struct p2m_domain *p2m = p2m_get_hostp2m(d);
> unsigned long i;
> p2m_type_t ot;
> - mfn_t omfn;
> int pod_count = 0;
> int rc = 0;
>
> @@ -1096,7 +1095,7 @@ guest_physmap_mark_populate_on_demand(st
> /* Make sure all gpfns are unused */
> for ( i = 0; i < (1UL << order); i++ )
> {
> - omfn = gfn_to_mfn_query(d, gfn + i, &ot);
> + gfn_to_mfn_query(d, gfn + i, &ot);
> if ( p2m_is_ram(ot) )
> {
> printk("%s: gfn_to_mfn returned type %d!\n",
> --- a/xen/arch/x86/time.c
> +++ b/xen/arch/x86/time.c
> @@ -1012,8 +1012,7 @@ 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 prev_master_stime, curr_master_stime;
> + s_time_t curr_local_stime, prev_master_stime, curr_master_stime;
>
> /* TSC timestamps taken during this calibration and prev calibration. */
> u64 prev_tsc, curr_tsc;
> @@ -1050,7 +1049,6 @@ static void local_time_calibration(void)
> }
>
> prev_tsc = t->local_tsc_stamp;
> - prev_local_stime = t->stime_local_stamp;
> prev_master_stime = t->stime_master_stamp;
>
> /* Disabling IRQs ensures we atomically read cpu_calibration struct. */
> @@ -1062,7 +1060,7 @@ static void local_time_calibration(void)
>
> #if 0
> printk("PRE%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64"\n",
> - smp_processor_id(), prev_tsc, prev_local_stime,
> prev_master_stime);
> + smp_processor_id(), prev_tsc, t->stime_local_stamp,
> prev_master_stime);
> printk("CUR%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64
> " -> %"PRId64"\n",
> smp_processor_id(), curr_tsc, curr_local_stime, curr_master_stime,
> --- a/xen/common/cpupool.c
> +++ b/xen/common/cpupool.c
> @@ -35,7 +35,7 @@ static DEFINE_SPINLOCK(cpupool_lock);
>
> DEFINE_PER_CPU(struct cpupool *, cpupool);
>
> -#define cpupool_dprintk(x...) ((void)0)
> +static inline void cpupool_dprintk(const char *fmt, ...) { }
>
> static struct cpupool *alloc_cpupool_struct(void)
> {
> --- a/xen/common/kexec.c
> +++ b/xen/common/kexec.c
> @@ -594,7 +594,7 @@ static int kexec_exec(XEN_GUEST_HANDLE(v
> break;
> }
>
> - return -EINVAL; /* never reached */
> + return ret; /* never reached */
> }
>
> int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
> --- a/xen/common/unlzo.c
> +++ b/xen/common/unlzo.c
> @@ -68,7 +68,6 @@ static int INIT parse_header(u8 *input,
> {
> int l;
> u8 *parse = input;
> - u8 level = 0;
> u16 version;
>
> /* read magic: 9 first bits */
> @@ -82,7 +81,7 @@ static int INIT parse_header(u8 *input,
> version = get_unaligned_be16(parse);
> parse += 7;
> if (version >= 0x0940)
> - level = *parse++;
> + parse++;
> if (get_unaligned_be32(parse) & HEADER_HAS_FILTER)
> parse += 8; /* flags + filter info */
> else
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-08-25 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 14:20 [PATCH] fix gcc-4.6's set-but-not-used warnings Jan Beulich
2011-08-25 14:39 ` Keir Fraser [this message]
2011-08-25 15:08 ` Jan Beulich
2011-08-25 15:43 ` Jan Beulich
2011-08-25 16:27 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA7C1D17.1FC04%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).