From b6e3710e5be862c8ef59c6a80930f8acbe0114e4 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 2 Jun 2019 19:23:22 +0200 Subject: [PATCH] Remove lint checks in system headers. Modern checkers do not (need to) pass this anymore to the build. --- include/alloca.h | 2 -- include/stdlib.h | 10 +++------- sys/sys/cdefs.h | 26 -------------------------- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/include/alloca.h b/include/alloca.h index 2f86003c4a..9599886c80 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -36,9 +36,7 @@ __BEGIN_DECLS #undef alloca /* some GNU bits try to get cute and define this on their own */ -#ifndef lint void *alloca(size_t); -#endif #if __GNUC__ >= 2 || defined(__INTEL_COMPILER) #define alloca(sz) __builtin_alloca(sz) diff --git a/include/stdlib.h b/include/stdlib.h index f983f0ff67..a2c78d4d53 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -247,17 +247,13 @@ extern void (*_malloc_message)(const char *, const char *, const char *, /* * The alloca() function can't be implemented in C, and on some * platforms it can't be implemented at all as a callable function. - * The GNU C compiler provides a built-in alloca() which we can use; - * in all other cases, provide a prototype, mainly to pacify various - * incarnations of lint. On platforms where alloca() is not in libc, - * programs which use it will fail to link when compiled with non-GNU - * compilers. + * The GNU C compiler provides a built-in alloca() which we can use. + * On platforms where alloca() is not in libc, programs which use it + * will fail to link when compiled with non-GNU compilers. */ #if __GNUC__ >= 2 || defined(__INTEL_COMPILER) #undef alloca /* some GNU bits try to get cute and define this on their own */ #define alloca(sz) __builtin_alloca(sz) -#elif defined(lint) -void *alloca(size_t); #endif __uint32_t diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index e2562ec767..7d0f417340 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -159,30 +159,6 @@ * properly (old versions of gcc-2 supported the dead and pure features * in a different (wrong) way). */ -#ifdef lint -#define __dead2 -#define __pure -#define __pure2 -#define __unused -#define __packed -#define __aligned(x) -#define __alloc_align(x) -#define __alloc_size(x) -#define __alloc_size2(n, x) -#define __section(x) -#define __always_inline -#define __nonnull(...) -#define __heedresult -#define __malloclike -#define __returns_twice -#define __weak_symbol - -#define __read_mostly -#define __read_frequently -#define __exclusive_cache_line - -#else - #define __weak_symbol __attribute__((__weak__)) #if __GNUC_PREREQ__(2, 7) #define __dead2 __attribute__((__noreturn__)) @@ -252,8 +228,6 @@ #define __alloc_align(x) #endif -#endif /* LINT */ - #if !__GNUC_PREREQ__(2, 7) && __STDC_VERSION__ < 199901 #define __func__ NULL #endif -- 2.41.0