Le Jeudi 12 Janvier 2006 09:44, Tian, Kevin a écrit :
>       I think above patches to fix warning are very important and always
> welcomed for stability. Maybe Dan was in busy with other more important
> threads at time you sent out them. Could you re-send them out?
>
> >For sure, fixing warnings is *very* boring.  Some are in fact bugs:
> > function called with less arguments, very dubious casts...
> >I really think warnings must be enabled and the earlier is the better.
> >
> >Tristan.
>
> Absolutely agree.
Hi,

here is the (small) patch which enable warnings and fixes those which occurs 
in every file.
This is really a minimal patch. I think this is a good start point.

Tristan.
# HG changeset patch
# User [EMAIL PROTECTED]
# Node ID 34a8366f42ac3347face862e5f59a3f3aeff8589
# Parent  1507c5499a92a7701db9cc3b0bf9ac5fb3fa8ee2
Enable warnings and fix a few one (those which occur in almost every file).
The next step is to fix warnings one by one.

Signed-off-by: Tristan Gingold <[EMAIL PROTECTED]>

diff -r 1507c5499a92 -r 34a8366f42ac xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk	Fri Jan  6 18:39:28 2006
+++ b/xen/arch/ia64/Rules.mk	Thu Jan 12 07:58:30 2006
@@ -23,10 +23,10 @@
            -I$(BASEDIR)/include/asm-ia64/linux-xen 			\
 	   -I$(BASEDIR)/include/asm-ia64/linux-null 			\
            -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen
-CFLAGS  += -Wno-pointer-arith -Wredundant-decls
+#CFLAGS  += -Wno-pointer-arith -Wredundant-decls
 CFLAGS  += -DIA64 -DXEN -DLINUX_2_6 -DV_IOSAPIC_READY
 CFLAGS	+= -ffixed-r13 -mfixed-range=f12-f15,f32-f127
-CFLAGS	+= -w -g
+CFLAGS	+= -g
 #CFLAGS  += -DVTI_DEBUG
 ifeq ($(VALIDATE_VT),y)
 CFLAGS  += -DVALIDATE_VT
diff -r 1507c5499a92 -r 34a8366f42ac xen/arch/ia64/linux-xen/sal.c
--- a/xen/arch/ia64/linux-xen/sal.c	Fri Jan  6 18:39:28 2006
+++ b/xen/arch/ia64/linux-xen/sal.c	Thu Jan 12 07:58:30 2006
@@ -16,6 +16,7 @@
 
 #ifdef XEN
 #include <linux/smp.h>
+#include <xen/lib.h>
 #endif
 #include <asm/page.h>
 #include <asm/sal.h>
diff -r 1507c5499a92 -r 34a8366f42ac xen/arch/ia64/xen/sn_console.c
--- a/xen/arch/ia64/xen/sn_console.c	Fri Jan  6 18:39:28 2006
+++ b/xen/arch/ia64/xen/sn_console.c	Thu Jan 12 07:58:30 2006
@@ -4,6 +4,7 @@
  * Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
+#include <xen/lib.h>
 #include <asm/acpi.h>
 #include <asm/sn/sn_sal.h>
 #include <xen/serial.h>
diff -r 1507c5499a92 -r 34a8366f42ac xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h	Fri Jan  6 18:39:28 2006
+++ b/xen/include/asm-ia64/config.h	Thu Jan 12 07:58:30 2006
@@ -92,7 +92,7 @@
 //#define __acquire(x) (void)0
 //#define __release(x) (void)0
 //#define __cond_lock(x) (x)
-#define __must_check
+//#define __must_check
 #define __deprecated
 #ifndef RELOC_HIDE
 # define RELOC_HIDE(ptr, off)					\
@@ -187,7 +187,9 @@
 		  struct exception_table_entry *finish);
 void sort_main_extable(void);
 
+#if 0 /* Already defined in xen/lib.h */
 #define printk printf
+#endif
 
 #undef  __ARCH_IRQ_STAT
 
@@ -205,7 +207,6 @@
 #define	OPT_CONSOLE_STR "com2"
 #endif
 
-#define __attribute_used__	__attribute__ ((unused))
 #define __nocast
 
 // see include/asm-x86/atomic.h (different from standard linux)
@@ -255,9 +256,6 @@
 #define seq_printf(a,b...) printf(b)
 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
-// needed for newer ACPI code
-#define asmlinkage
-
 #define FORCE_CRASH()	asm("break 0;;");
 
 void dummy_called(char *function);
@@ -306,13 +304,8 @@
 #endif
 
 
-// FOLLOWING ADDED FOR XEN POST-NGIO and/or LINUX 2.6.7
-
-// following derived from linux/include/linux/compiler-gcc3.h
-// problem because xen (over?)simplifies include/xen/compiler.h
-#if __GNUC_MAJOR < 3 || __GNUC_MINOR__ >= 3
-# define __attribute_used__	__attribute__((__used__))
-#else
-# define __attribute_used__	__attribute__((__unused__))
-#endif
+#ifndef __ASSEMBLY__
+#include <linux/linkage.h>
+#endif
+
 #endif	/* _IA64_CONFIG_H_ */
diff -r 1507c5499a92 -r 34a8366f42ac xen/include/asm-ia64/vmmu.h
--- a/xen/include/asm-ia64/vmmu.h	Fri Jan  6 18:39:28 2006
+++ b/xen/include/asm-ia64/vmmu.h	Thu Jan 12 07:58:30 2006
@@ -151,8 +151,8 @@
 typedef u64 *(THASH_FN)(PTA pta, u64 va);
 typedef u64 *(TTAG_FN)(PTA pta, u64 va);
 typedef u64 *(GET_MFN_FN)(domid_t d, u64 gpfn, u64 pages);
-typedef void *(REM_NOTIFIER_FN)(struct hash_cb *hcb, thash_data_t *entry);
-typedef void (RECYCLE_FN)(struct hash_cb *hc, u64 para);
+typedef void *(REM_NOTIFIER_FN)(struct thash_cb *hcb, thash_data_t *entry);
+typedef void (RECYCLE_FN)(struct thash_cb *hc, u64 para);
 typedef ia64_rr (GET_RR_FN)(struct vcpu *vcpu, u64 reg);
 typedef thash_data_t *(FIND_OVERLAP_FN)(struct thash_cb *hcb, 
         u64 va, u64 ps, int rid, char cl, search_section_t s_sect);
_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel

Reply via email to