From: Kees van Reeuwijk Date: Tue, 13 Apr 2010 15:22:38 +0000 (+0000) Subject: Remove some duplicate declarations in headers. X-Git-Tag: v3.1.7~145 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=fa3adedf639cee744c9754383745bfaf1f3b4e08;p=minix.git Remove some duplicate declarations in headers. Explicitly declare some functions as returning void. --- diff --git a/commands/elle/sbm.c b/commands/elle/sbm.c index e3149715e..fa4fe0186 100644 --- a/commands/elle/sbm.c +++ b/commands/elle/sbm.c @@ -499,6 +499,7 @@ unsigned size; /* SBM_MFREE(sm) - Free up an allocated memory area. */ +void sbm_mfree(sm) register struct smblk *sm; { register struct smblk *smx; diff --git a/commands/elle/sbproto.h b/commands/elle/sbproto.h index 007bbbfad..a7ad5455d 100644 --- a/commands/elle/sbproto.h +++ b/commands/elle/sbproto.h @@ -32,7 +32,7 @@ _PROTOTYPE( struct smblk *sbm_lmak, (SBMA addr, SBMO elsize, int num) ); _PROTOTYPE( int sbm_nmov, (struct smblk *smp1, struct smblk *smp2, struct smblk **begp, int elsize) ); _PROTOTYPE( struct smblk *sbm_mget, (SBMO cmin, SBMO cmax) ); _PROTOTYPE( char *sbm_brk, (unsigned size) ); -_PROTOTYPE( int sbm_mfree, (struct smblk *sm) ); +_PROTOTYPE( void sbm_mfree, (struct smblk *sm) ); _PROTOTYPE( struct smblk *sbm_exp, (struct smblk *sm, SBMO size) ); _PROTOTYPE( int sbm_mmrg, (struct smblk *smp) ); _PROTOTYPE( struct smblk *sbm_split, (struct smblk *smp, SBMO coff) ); diff --git a/include/minix/const.h b/include/minix/const.h index c528f0b74..736980c9d 100644 --- a/include/minix/const.h +++ b/include/minix/const.h @@ -21,10 +21,10 @@ */ #ifndef UNUSED -#if defined(__GNUC__) +#if defined _lint +# define UNUSED(v) /*lint -e(715,818)*/ v +#elif defined(__GNUC__) # define UNUSED(v) UNUSED_ ## v __attribute((unused)) -#elif defined _lint -# define UNUSED(v) /*lint -e(715)*/ v #elif defined __LCLINT__ # define UNUSED(v) /*@unused@*/ v #else diff --git a/kernel/arch/i386/apic.h b/kernel/arch/i386/apic.h index 96bf27aa1..45f8c9cb4 100644 --- a/kernel/arch/i386/apic.h +++ b/kernel/arch/i386/apic.h @@ -114,9 +114,6 @@ EXTERN u32_t ioapic_id_mask[8]; EXTERN u32_t lapic_id_mask[8]; EXTERN u32_t lapic_addr_vaddr; /* we remember the virtual address here until we switch to paging */ -EXTERN u32_t lapic_addr; -EXTERN u32_t lapic_eoi_addr; -EXTERN u32_t lapic_taskpri_addr; _PROTOTYPE (void calc_bus_clock, (void)); _PROTOTYPE (u32_t lapic_errstatus, (void)); diff --git a/kernel/arch/i386/proto.h b/kernel/arch/i386/proto.h index ee25a003b..7a8ed8356 100644 --- a/kernel/arch/i386/proto.h +++ b/kernel/arch/i386/proto.h @@ -72,7 +72,6 @@ _PROTOTYPE( void int86, (void) ); _PROTOTYPE( reg_t read_cr0, (void) ); _PROTOTYPE( reg_t read_cr2, (void) ); _PROTOTYPE( void write_cr0, (unsigned long value) ); -_PROTOTYPE( unsigned long read_cr3, (void) ); _PROTOTYPE( unsigned long read_cr4, (void) ); _PROTOTYPE( void write_cr4, (unsigned long value) ); _PROTOTYPE( unsigned long read_cpu_flags, (void) ); diff --git a/lib/libedit/editline.c b/lib/libedit/editline.c index b17be01d1..8e7e56ee7 100644 --- a/lib/libedit/editline.c +++ b/lib/libedit/editline.c @@ -99,7 +99,6 @@ STATIC CHAR *editinput(); extern int read(); extern int write(); #if defined(USE_TERMCAP) -extern char *getenv(); extern char *tgetstr(); extern int tgetent(); #endif /* defined(USE_TERMCAP) */