aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/fcntl.h1
-rw-r--r--include/unistd.h8
2 files changed, 5 insertions, 4 deletions
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