From dbfb54ffeaabbbdd59248c609c71c00e01a6083c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 9 Dec 2007 21:00:36 +0000 Subject: Eliminate compilation warnings due to the use of non-static inlines through the introduction and use of the __gnu89_inline attribute. Submitted by: bde (i386) MFC after: 3 days --- sys/amd64/amd64/pmap.c | 6 +++--- sys/conf/files.amd64 | 2 +- sys/conf/files.i386 | 2 +- sys/i386/i386/pmap.c | 6 +++--- sys/sys/cdefs.h | 6 ++++++ 5 files changed, 14 insertions(+), 8 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 40c710c33c1b..e0c5e9ac7dce 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -154,7 +154,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE __inline +#define PMAP_INLINE __gnu89_inline #else #define PMAP_INLINE #endif @@ -1094,7 +1094,7 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static PMAP_INLINE void +static __inline void pmap_free_zero_pages(vm_page_t free) { vm_page_t m; @@ -1110,7 +1110,7 @@ pmap_free_zero_pages(vm_page_t free) * This routine unholds page table pages, and if the hold count * drops to zero, then it decrements the wire count. */ -static PMAP_INLINE int +static __inline int pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 8276f850fcf8..5ae4fa1a0036 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -116,7 +116,7 @@ amd64/amd64/mptable.c optional mptable amd64/amd64/mptable_pci.c optional mptable pci amd64/amd64/msi.c optional pci amd64/amd64/nexus.c standard -amd64/amd64/pmap.c standard nowerror +amd64/amd64/pmap.c standard amd64/amd64/prof_machdep.c optional profiling-routine amd64/amd64/sigtramp.S standard amd64/amd64/stack_machdep.c optional ddb | stack diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 9e43eca166f6..ec47196eb254 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -306,7 +306,7 @@ i386/i386/mptable_pci.c optional apic pci i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon -i386/i386/pmap.c standard nowerror +i386/i386/pmap.c standard i386/i386/ptrace_machdep.c standard i386/i386/stack_machdep.c optional ddb | stack i386/i386/support.s standard diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 662f97f30014..fb46c357d75c 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -163,7 +163,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE __inline +#define PMAP_INLINE __gnu89_inline #else #define PMAP_INLINE #endif @@ -1144,7 +1144,7 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static PMAP_INLINE void +static __inline void pmap_free_zero_pages(vm_page_t free) { vm_page_t m; @@ -1160,7 +1160,7 @@ pmap_free_zero_pages(vm_page_t free) * This routine unholds page table pages, and if the hold count * drops to zero, then it decrements the wire count. */ -static PMAP_INLINE int +static __inline int pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) { diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index d7dff1f2be55..5a2564b194d1 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -235,6 +235,12 @@ #define __always_inline #endif +#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */ +#define __gnu89_inline __attribute__((__gnu_inline__)) __inline +#else +#define __gnu89_inline +#endif + #if __GNUC_PREREQ__(3, 3) #define __nonnull(x) __attribute__((__nonnull__(x))) #else -- cgit v1.2.3