From f2c5ac590d442a32e2d5cd77af776a05b977b949 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 27 Dec 2015 20:43:19 +0100 Subject: fix errors and warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/alloca.h | 4 ++-- include/stdio.h | 2 +- include/stdlib.h | 14 -------------- include/unistd.h | 6 +++--- 4 files changed, 6 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/alloca.h b/include/alloca.h index 4c9db33..ff2f8c8 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -46,7 +46,7 @@ * * @since Always. */ -void* alloca(size_t); +void* alloca(size_t) __GCC_ONLY(__attribute__((__warn_unused_result__))); #if defined(__GNUC__) # define alloca(size) __builtin_alloca(size) @@ -94,7 +94,7 @@ void (needstack)(int); * @param func The function in the source code whence the check was made, * `NULL` if unknown (C99 is required.) */ -void __needstack(int, const char*, int, const char*) +void __needstack(int, const char*, int, const char*); diff --git a/include/stdio.h b/include/stdio.h index 5c2f6ca..67ec7a3 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -515,7 +515,7 @@ int vdprintf(int, const char* restrict, va_list) * @since Always. */ int vsockprintf(int, int, const char* restrict, va_list) - __GCC_ONLY(__attribute__((__nonnull__(3), __format__(__slibc_printf__, 3, 4)))); + __GCC_ONLY(__attribute__((__nonnull__(3)))); #endif /** diff --git a/include/stdlib.h b/include/stdlib.h index 0cb5f49..86f5f15 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -288,20 +288,6 @@ long long int atoq(const char*) #endif -#if !defined(__PORTABLE) -/** - * This function is identical to `atoll`. - * - * This is a Linux libc extension. - * - * @since Always. - */ -long long int atoq(const char*) - __deprecated("'atoq' is obsolete and not portable, use 'atoll' instead.") - __GCC_ONLY(__attribute__((__warn_unused_result__, __nonnull__))); -#endif - - #if defined(__SVID_SOURCE) || defined(__BSD_SOURCE) /** * This function shall in some manner clear the environment. diff --git a/include/unistd.h b/include/unistd.h index 963bb96..f4d699c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -891,7 +891,7 @@ int fexecve(int, char* const[], char* const[]); * @since Always. */ char* searchpath(const char*) - __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); + __GCC_ONLY(__attribute__((__nonnull__(1), __warn_unused_result__))); #endif #if defined(__SLIBC_SOURCE) @@ -932,7 +932,7 @@ char* searchpath(const char*) * @since Always. */ char* searchpath2(const char*, const char*) - __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); + __GCC_ONLY(__attribute__((__nonnull__(1), __warn_unused_result__))); /** * Search the environment variable $PATH for an executable @@ -974,7 +974,7 @@ char* searchpath2(const char*, const char*) * @since Always. */ char* searchpath3(const char*, const char*, const char*) - __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); + __GCC_ONLY(__attribute__((__nonnull__(1), __warn_unused_result__))); #endif -- cgit v1.2.3-70-g09d2