From: "Andi Kleen" Fix some gcc 4 warnings in arch/x86_64 There are tons more outside though. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton --- 25-akpm/arch/x86_64/kernel/head64.c | 13 +++++++------ 25-akpm/arch/x86_64/kernel/setup.c | 8 ++++---- 25-akpm/arch/x86_64/kernel/signal.c | 2 +- 25-akpm/include/asm-x86_64/msr.h | 3 ++- 25-akpm/include/asm-x86_64/unistd.h | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff -puN arch/x86_64/kernel/head64.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 arch/x86_64/kernel/head64.c --- 25/arch/x86_64/kernel/head64.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 2005-01-09 23:01:19.336443520 -0800 +++ 25-akpm/arch/x86_64/kernel/head64.c 2005-01-09 23:01:19.353440936 -0800 @@ -61,16 +61,17 @@ static void __init copy_bootdata(char *r static void __init setup_boot_cpu_data(void) { - int dummy, eax; + unsigned int dummy, eax; /* get vendor info */ - cpuid(0, &boot_cpu_data.cpuid_level, - (int *)&boot_cpu_data.x86_vendor_id[0], - (int *)&boot_cpu_data.x86_vendor_id[8], - (int *)&boot_cpu_data.x86_vendor_id[4]); + cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level, + (unsigned int *)&boot_cpu_data.x86_vendor_id[0], + (unsigned int *)&boot_cpu_data.x86_vendor_id[8], + (unsigned int *)&boot_cpu_data.x86_vendor_id[4]); /* get cpu type */ - cpuid(1, &eax, &dummy, &dummy, (int *) &boot_cpu_data.x86_capability); + cpuid(1, &eax, &dummy, &dummy, + (unsigned int *) &boot_cpu_data.x86_capability); boot_cpu_data.x86 = (eax >> 8) & 0xf; boot_cpu_data.x86_model = (eax >> 4) & 0xf; boot_cpu_data.x86_mask = eax & 0xf; diff -puN arch/x86_64/kernel/setup.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 arch/x86_64/kernel/setup.c --- 25/arch/x86_64/kernel/setup.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 2005-01-09 23:01:19.339443064 -0800 +++ 25-akpm/arch/x86_64/kernel/setup.c 2005-01-09 23:01:19.354440784 -0800 @@ -849,10 +849,10 @@ void __init early_identify_cpu(struct cp memset(&c->x86_capability, 0, sizeof c->x86_capability); /* Get vendor name */ - cpuid(0x00000000, &c->cpuid_level, - (int *)&c->x86_vendor_id[0], - (int *)&c->x86_vendor_id[8], - (int *)&c->x86_vendor_id[4]); + cpuid(0x00000000, (unsigned int *)&c->cpuid_level, + (unsigned int *)&c->x86_vendor_id[0], + (unsigned int *)&c->x86_vendor_id[8], + (unsigned int *)&c->x86_vendor_id[4]); get_cpu_vendor(c); diff -puN arch/x86_64/kernel/signal.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 arch/x86_64/kernel/signal.c --- 25/arch/x86_64/kernel/signal.c~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 2005-01-09 23:01:19.342442608 -0800 +++ 25-akpm/arch/x86_64/kernel/signal.c 2005-01-09 23:01:19.355440632 -0800 @@ -139,7 +139,7 @@ asmlinkage long sys_rt_sigreturn(struct { struct rt_sigframe __user *frame; sigset_t set; - long eax; + unsigned long eax; frame = (struct rt_sigframe __user *)(regs->rsp - 8); if (verify_area(VERIFY_READ, frame, sizeof(*frame))) { diff -puN include/asm-x86_64/msr.h~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 include/asm-x86_64/msr.h --- 25/include/asm-x86_64/msr.h~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 2005-01-09 23:01:19.346442000 -0800 +++ 25-akpm/include/asm-x86_64/msr.h 2005-01-09 23:01:19.355440632 -0800 @@ -67,7 +67,8 @@ : "=a" (low), "=d" (high) \ : "c" (counter)) -extern inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx) +extern inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) { __asm__("cpuid" : "=a" (*eax), diff -puN include/asm-x86_64/unistd.h~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 include/asm-x86_64/unistd.h --- 25/include/asm-x86_64/unistd.h~x86_64-fix-some-gcc-4-warnings-in-arch-x86_64 2005-01-09 23:01:19.348441696 -0800 +++ 25-akpm/include/asm-x86_64/unistd.h 2005-01-09 23:01:19.356440480 -0800 @@ -724,7 +724,7 @@ static inline long dup(unsigned int fd) } /* implemented in asm in arch/x86_64/kernel/entry.S */ -extern long execve(char *, char **, char **); +extern int execve(const char *, char * const *, char * const *); static inline long open(const char * filename, int flags, int mode) { _