From 0e56776e80613e7647cd0158d703c74ea560221b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 21 Dec 2015 14:22:28 +0100 Subject: attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/fcntl.h | 1 + include/unistd.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/fcntl.h b/include/fcntl.h index 02230c7..6bc42f0 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -48,6 +48,7 @@ * @since Always. */ int creat(const char*, mode_t) + __GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__))) __deprecated("Use 'open' instead."); diff --git a/include/unistd.h b/include/unistd.h index ebc58f4..fb1a1c8 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -832,7 +832,7 @@ int fexecve(int, char* const[], char* const[]); * @since Always. */ char* searchpath(const char*) - __GCC_ONLY(__attribute__((__nonnull__(0)))); + __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); #endif #if defined(__SLIBC_SOURCE) @@ -873,7 +873,7 @@ char* searchpath(const char*) * @since Always. */ char* searchpath2(const char*, const char*) - __GCC_ONLY(__attribute__((__nonnull__(0)))); + __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); /** * Search the environment variable $PATH for an executable @@ -915,7 +915,7 @@ char* searchpath2(const char*, const char*) * @since Always. */ char* searchpath3(const char*, const char*, const char*) - __GCC_ONLY(__attribute__((__nonnull__(0)))); + __GCC_ONLY(__attribute__((__nonnull__(0), __warn_unused_result__))); #endif @@ -1108,7 +1108,7 @@ int daemon(int, int) * @since Always. */ int daemonise(const char*, int) - __GCC_ONLY(__attribute__((__nonnull__))); + __GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__))); #endif -- cgit v1.2.3-70-g09d2