|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] remove the use of -Wno-unused-value
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1323772595 -3600
# Node ID 63a79abb84e030559536d5868e611a0805d01c51
# Parent 4f5a22cd85987713013c7b916b65a0f883db2c98
remove the use of -Wno-unused-value
It has been hiding actual mistakes, and there are not too many changes
necessary to make things build without suppressing this warning.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 4f5a22cd8598 -r 63a79abb84e0 Config.mk
--- a/Config.mk Tue Dec 13 09:50:21 2011 +0100
+++ b/Config.mk Tue Dec 13 11:36:35 2011 +0100
@@ -157,10 +157,6 @@
CFLAGS += -Wall -Wstrict-prototypes
-# -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
-# result of any casted expression causes a warning.
-CFLAGS += -Wno-unused-value
-
# Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
# and is over-zealous with the printf format lint
CFLAGS-$(clang) += -Wno-parentheses -Wno-format
diff -r 4f5a22cd8598 -r 63a79abb84e0 tools/libfsimage/common/fsimage_grub.h
--- a/tools/libfsimage/common/fsimage_grub.h Tue Dec 13 09:50:21 2011 +0100
+++ b/tools/libfsimage/common/fsimage_grub.h Tue Dec 13 11:36:35 2011 +0100
@@ -57,7 +57,7 @@
#define disk_read_func (*fsig_disk_read_junk())
#define disk_read_hook (*fsig_disk_read_junk())
#define print_possibilities 0
-#define noisy_printf
+#define noisy_printf(fmt...)
#define grub_memset memset
#define grub_memmove memmove
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/arch/x86/debug.c
--- a/xen/arch/x86/debug.c Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/arch/x86/debug.c Tue Dec 13 11:36:35 2011 +0100
@@ -37,8 +37,8 @@
#define DBGP1(...) {(kdbdbg>1) ? kdbp(__VA_ARGS__):0;}
#define DBGP2(...) {(kdbdbg>2) ? kdbp(__VA_ARGS__):0;}
#else
-#define DBGP1(...) {0;}
-#define DBGP2(...) {0;}
+#define DBGP1(...) ((void)0)
+#define DBGP2(...) ((void)0)
#endif
/* Returns: mfn for the given (hvm guest) vaddr */
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/arch/x86/hvm/svm/vpmu.c
--- a/xen/arch/x86/hvm/svm/vpmu.c Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/arch/x86/hvm/svm/vpmu.c Tue Dec 13 11:36:35 2011 +0100
@@ -154,7 +154,7 @@
if ( GET_APIC_DELIVERY_MODE(vlapic_lvtpc) == APIC_MODE_FIXED )
vlapic_set_irq(vcpu_vlapic(v), int_vec, 0);
else
- test_and_set_bool(v->nmi_pending);
+ v->nmi_pending = 1;
return 1;
}
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/arch/x86/hvm/vmx/vpmu_core2.c
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Dec 13 11:36:35 2011 +0100
@@ -574,7 +574,7 @@
if ( GET_APIC_DELIVERY_MODE(vlapic_lvtpc) == APIC_MODE_FIXED )
vlapic_set_irq(vcpu_vlapic(v), int_vec, 0);
else
- test_and_set_bool(v->nmi_pending);
+ v->nmi_pending = 1;
return 1;
}
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/arch/x86/oprofile/nmi_int.c
--- a/xen/arch/x86/oprofile/nmi_int.c Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/arch/x86/oprofile/nmi_int.c Tue Dec 13 11:36:35 2011 +0100
@@ -92,7 +92,7 @@
send_guest_vcpu_virq(current, VIRQ_XENOPROF);
if ( ovf == 2 )
- test_and_set_bool(current->nmi_pending);
+ current->nmi_pending = 1;
return 1;
}
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/include/asm-x86/debugger.h
--- a/xen/include/asm-x86/debugger.h Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/include/asm-x86/debugger.h Tue Dec 13 11:36:35 2011 +0100
@@ -55,7 +55,12 @@
#else
-#define debugger_trap_fatal(v, r) (0)
+static inline int debugger_trap_fatal(
+ unsigned int vector, struct cpu_user_regs *regs)
+{
+ return 0;
+}
+
#define debugger_trap_immediate() ((void)0)
#endif
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h Tue Dec 13 11:36:35 2011 +0100
@@ -235,7 +235,7 @@
#define hvm_long_mode_enabled(v) \
((v)->arch.hvm_vcpu.guest_efer & EFER_LMA)
#else
-#define hvm_long_mode_enabled(v) (v,0)
+#define hvm_long_mode_enabled(v) ((void)(v),0)
#endif
enum hvm_intblk
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/include/xen/tmem_xen.h
--- a/xen/include/xen/tmem_xen.h Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/include/xen/tmem_xen.h Tue Dec 13 11:36:35 2011 +0100
@@ -365,7 +365,7 @@
// FIXME: code in assembly?
ASSERT(p1 != NULL);
ASSERT(p2 != NULL);
- for ( i = PAGE_SIZE/sizeof(uint64_t); i && *p1 == *p2; i--, *p1++, *p2++ );
+ for ( i = PAGE_SIZE/sizeof(uint64_t); i && *p1 == *p2; i--, p1++, p2++ );
if ( !i )
return 0;
if ( *p1 < *p2 )
@@ -386,7 +386,7 @@
if ( len1 > len2 )
return 1;
ASSERT(len1 == len2);
- for ( i = len2; i && *p1 == *p2; i--, *p1++, *p2++ );
+ for ( i = len2; i && *p1 == *p2; i--, p1++, p2++ );
if ( !i )
return 0;
if ( *p1 < *p2 )
@@ -413,7 +413,7 @@
if ( pfp_len > tze_len )
return 1;
ASSERT(pfp_len == tze_len);
- for ( i = tze_len/sizeof(uint64_t); i && *p1 == *p2; i--, *p1++, *p2++ );
+ for ( i = tze_len/sizeof(uint64_t); i && *p1 == *p2; i--, p1++, p2++ );
if ( !i )
return 0;
if ( *p1 < *p2 )
diff -r 4f5a22cd8598 -r 63a79abb84e0 xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h Tue Dec 13 09:50:21 2011 +0100
+++ b/xen/include/xsm/xsm.h Tue Dec 13 11:36:35 2011 +0100
@@ -163,7 +163,7 @@
static inline void xsm_security_domaininfo (struct domain *d,
struct xen_domctl_getdomaininfo *info)
{
- xsm_call(security_domaininfo(d, info));
+ (void)xsm_call(security_domaininfo(d, info));
}
static inline int xsm_setvcpucontext(struct domain *d)
@@ -310,7 +310,7 @@
static inline void xsm_evtchn_close_post (struct evtchn *chn)
{
- xsm_call(evtchn_close_post(chn));
+ (void)xsm_call(evtchn_close_post(chn));
}
static inline int xsm_evtchn_send (struct domain *d, struct evtchn *chn)
@@ -366,7 +366,7 @@
static inline void xsm_free_security_domain (struct domain *d)
{
- xsm_call(free_security_domain(d));
+ (void)xsm_call(free_security_domain(d));
}
static inline int xsm_alloc_security_evtchn (struct evtchn *chn)
@@ -376,7 +376,7 @@
static inline void xsm_free_security_evtchn (struct evtchn *chn)
{
- xsm_call(free_security_evtchn(chn));
+ (void)xsm_call(free_security_evtchn(chn));
}
static inline int xsm_memory_adjust_reservation (struct domain *d1, struct
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |