[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] fix gcc-4.6's set-but-not-used warnings



>>> On 25.08.11 at 16:39, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 25/08/2011 15:20, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
> 
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
> 
> But we compile with -Wno-unused-but-set-variable?

Hmm, now that you say it I recall that was meant to be the case. But it
isn't in my cross-build environment, and hence I'm seeing the errors now
that I switched to 4.6.1. Let me check what goes wrong with the feature
detection (as I'll be out of the office tomorrow and al of next week, that'll
likely be only in the second week of September then).

Jan

>> --- 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@xxxxxxxxxxxxxxxxxxx 
>> http://lists.xensource.com/xen-devel 



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.