diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/alloca.h | 1 | ||||
-rw-r--r-- | include/arpa/inet.h | 12 | ||||
-rw-r--r-- | include/ctype.h | 68 |
3 files changed, 41 insertions, 40 deletions
diff --git a/include/alloca.h b/include/alloca.h index a660f1e..d54d18d 100644 --- a/include/alloca.h +++ b/include/alloca.h @@ -47,6 +47,7 @@ * @since Always. */ void* alloca(size_t); + __GCC_ONLY(__attribute__((__warn_unused_result__))); #if defined(__GNUC__) # define alloca(size) __builtin_alloca(size) #endif diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 8552838..34ff52c 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -46,7 +46,7 @@ * @since Always. */ uint16_t _ntohs(uint16_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if !defined(__PORTABLE) # define ntohs _ntohs #else @@ -65,7 +65,7 @@ uint16_t _ntohs(uint16_t) * @since Always. */ uint32_t _ntohl(uint32_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if !defined(__PORTABLE) # define ntohl _ntohl #else @@ -87,7 +87,7 @@ uint32_t _ntohl(uint32_t) * @since Always. */ uint64_t _ntohll(uint64_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); # if !defined(__PORTABLE) # define ntohll _ntohll # else @@ -107,7 +107,7 @@ uint64_t _ntohll(uint64_t) * @since Always. */ uint16_t _htons(uint16_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if !defined(__PORTABLE) # define htons _htons #else @@ -126,7 +126,7 @@ uint16_t _htons(uint16_t) * @since Always. */ uint32_t _htonl(uint32_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if !defined(__PORTABLE) # define htonl _htonl #else @@ -148,7 +148,7 @@ uint32_t _htonl(uint32_t) * @since Always. */ uint64_t _htonll(uint64_t) - __GCC_ONLY(__attribute__((__const__, __warn_unuses_result__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); # if !defined(__PORTABLE) # define htonll _htonll # else diff --git a/include/ctype.h b/include/ctype.h index 3147deb..e994ed5 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -45,7 +45,7 @@ * @since Always. */ int (isalnum)(int) /* [0x30, 0x39], [0x41, 0x5A], [0x61, 0x7A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined (__GNUC__) # define isalnum(c) \ ({ int __c = (c); (isalpha(__c) || isdigit(__c)); }) @@ -64,7 +64,7 @@ int (isalnum)(int) /* [0x30, 0x39], [0x41, 0x5A], [0x61, 0x7A] */ * @since Always. */ int (isalpha)(int) /* [0x41, 0x5A], [0x61, 0x7A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isalpha(c) (islower(tolower(c))) @@ -83,7 +83,7 @@ int (isalpha)(int) /* [0x41, 0x5A], [0x61, 0x7A] */ * @since Always. */ int (isblank)(int) /* ' ', '\t' */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); # if defined(__GNUC__) # define isblank(c) \ ({ int __c = (c); ((__c == ' ') || (__c == '\t')); }) @@ -104,7 +104,7 @@ int (isblank)(int) /* ' ', '\t' */ * @since Always. */ int (iscntrl)(int) /* [0x00, 0x1F], 0x7F */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined(__GNUC__) # define iscntrl(c) \ ({ int __c = (c); (((unsigned)__c < ' ') || (__c == 0x7F)); }) @@ -122,7 +122,7 @@ int (iscntrl)(int) /* [0x00, 0x1F], 0x7F */ * @since Always. */ int (isdigit)(int) /* [0x30, 0x39] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isdigit(c) (int)((unsigned)((c) - '0') < 10) @@ -138,7 +138,7 @@ int (isdigit)(int) /* [0x30, 0x39] */ * @since Always. */ int (isgraph)(int) /* [0x21, 0x7E] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isgraph(c) (int)((unsigned)(c - 0x21) < 0x5E) @@ -154,7 +154,7 @@ int (isgraph)(int) /* [0x21, 0x7E] */ * @since Always. */ int (islower)(int) /* [0x61, 0x7A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define islower(c) (int)((unsigned)((c) - 'a') < 26) @@ -171,7 +171,7 @@ int (islower)(int) /* [0x61, 0x7A] */ * @since Always. */ int (isprint)(int) /* [0x20, 0x7E] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isprint(c) (int)((unsigned)(c - 0x20) < 0x5F) @@ -188,7 +188,7 @@ int (isprint)(int) /* [0x20, 0x7E] */ * @since Always. */ int (ispunct)(int) /* isprint && !isalnum && !isspace */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined (__GNUC__) # define ispunct(c) \ ({ int __c = (c); (isprint(__c) && !isalnum(__c) && !isspace(__c)); }) @@ -207,7 +207,7 @@ int (ispunct)(int) /* isprint && !isalnum && !isspace */ * @since Always. */ int (isspace)(int) /* 0x20, [0x09, 0x0D] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined (__GNUC__) # define isspace(c) \ ({ int __c = (c); ((__c == ' ') || ((unsigned)(__c - '\t') < 5)); }) @@ -226,7 +226,7 @@ int (isspace)(int) /* 0x20, [0x09, 0x0D] */ * @since Always. */ int (isupper)(int) /* [0x41, 0x5A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isupper(c) (int)((unsigned)((c) - 'A') < 26) @@ -244,7 +244,7 @@ int (isupper)(int) /* [0x41, 0x5A] */ * @since Always. */ int (isxdigit)(int) /* [0x30, 0x39], [0x41, 0x46], [0x61, 0x66] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined (__GNUC__) # define isxdigit(c) \ ({ int __c = (c); (isdigit(__c) && (tolower(__c) - 'a' < 6)); }) @@ -271,7 +271,7 @@ int (isxdigit)(int) /* [0x30, 0x39], [0x41, 0x46], [0x61, 0x66] */ * @since Always. */ int (tolower)(int) /* [0x41, 0x5A] -> [0x61, 0x7A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define tolower(c) (int)((unsigned)(c) | 0x20) /** @@ -293,7 +293,7 @@ int (tolower)(int) /* [0x41, 0x5A] -> [0x61, 0x7A] */ * @since Always. */ int (toupper)(int) /* [0x61, 0x7A] -> [0x41, 0x5A] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define toupper(c) (int)((unsigned)(c) & (unsigned)~0x20) @@ -309,7 +309,7 @@ int (toupper)(int) /* [0x61, 0x7A] -> [0x41, 0x5A] */ * @since Always. */ int (isascii)(int) /* [0x00, 0x7E] */ - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #define isascii(c) (int)((unsigned)(c) < 0x7F) /** @@ -331,7 +331,7 @@ int (isascii)(int) /* [0x00, 0x7E] */ */ int (toascii)(int) __warning("Using 'toascii' is, generally, unwise.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined(_SLIBC_SUPPRESS_WARNINGS) # define toascii(c) (int)((unsigned)(c) & 0x7F) #endif @@ -344,7 +344,7 @@ int (toascii)(int) */ int _tolower(int) __deprecated("Use 'tolower' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * This function is identical to `tolower`. @@ -354,7 +354,7 @@ int _tolower(int) */ int _toupper(int) __deprecated("Use 'toupper' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); @@ -373,7 +373,7 @@ int _toupper(int) */ int isalnum_l(int, locale_t) __warning("This function is dangerous, use 'iswalnum_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is an alphabetical character. @@ -388,7 +388,7 @@ int isalnum_l(int, locale_t) */ int isalpha_l(int, locale_t) __warning("This function is dangerous, use 'iswalpha_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #if defined(__GNU_SOURCE) /** @@ -407,7 +407,7 @@ int isalpha_l(int, locale_t) */ int isblank_l(int, locale_t) __warning("This function is dangerous, use 'iswblank_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); #endif /** @@ -424,7 +424,7 @@ int isblank_l(int, locale_t) */ int iscntrl_l(int, locale_t) __warning("This function is dangerous, use 'iswcntrl_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is a decimal digit. @@ -439,7 +439,7 @@ int iscntrl_l(int, locale_t) */ int isdigit_l(int, locale_t) __warning("This function is dangerous, use 'iswdigit_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is has a printable glyph. @@ -454,7 +454,7 @@ int isdigit_l(int, locale_t) */ int isgraph_l(int, locale_t) __warning("This function is dangerous, use 'iswgraph_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is a lowercase @@ -470,7 +470,7 @@ int isgraph_l(int, locale_t) */ int islower_l(int, locale_t) __warning("This function is dangerous, use 'iswlower_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is has a printable glyph @@ -487,7 +487,7 @@ int islower_l(int, locale_t) */ int isprint_l(int, locale_t) __warning("This function is dangerous, use 'iswprint_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is has a punctuation, @@ -504,7 +504,7 @@ int isprint_l(int, locale_t) */ int ispunct_l(int, locale_t) __warning("This function is dangerous, use 'iswpunct_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is a whitespace character. @@ -520,7 +520,7 @@ int ispunct_l(int, locale_t) */ int isspace_l(int, locale_t) __warning("This function is dangerous, use 'iswspace_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is an uppercase @@ -536,7 +536,7 @@ int isspace_l(int, locale_t) */ int isupper_l(int, locale_t) __warning("This function is dangerous, use 'iswupper_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is an ASCII @@ -554,7 +554,7 @@ int isupper_l(int, locale_t) */ int isxdigit_l(int, locale_t) __warning("This function is dangerous, use 'iswxdigit_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Check whether a character is an ASCII character. @@ -569,7 +569,7 @@ int isxdigit_l(int, locale_t) */ int isascii_l(int, locale_t) __warning("This function is dangerous, use 'iswascii_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Remove the 8:th bit from a character. @@ -587,7 +587,7 @@ int isascii_l(int, locale_t) */ int toascii_l(int, locale_t) __warning("This function is dangerous, use 'towascii_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Convert a uppercase ASCII character to @@ -611,7 +611,7 @@ int toascii_l(int, locale_t) */ int tolower_l(int, locale_t) __warning("This function is dangerous, use 'iswlower_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); /** * Convert a lowercase ASCII character to @@ -635,7 +635,7 @@ int tolower_l(int, locale_t) */ int toupper_l(int, locale_t) __warning("This function is dangerous, use 'iswupper_l' instead.") - __GCC_ONLY(__attribute__((__const__))); + __GCC_ONLY(__attribute__((__const__, __warn_unused_result__))); |