aboutsummaryrefslogtreecommitdiffstats
path: root/include/ctype.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-16 10:04:52 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-16 10:04:52 +0100
commit0a5906ec25e6a93935e21221a99179238933b60a (patch)
tree6fbbe2706209307b6fa9ba0025bebd560225babb /include/ctype.h
parentadd ntohs, ntohl, ntohll, htons, htonl, and htonll (diff)
downloadslibc-0a5906ec25e6a93935e21221a99179238933b60a.tar.gz
slibc-0a5906ec25e6a93935e21221a99179238933b60a.tar.bz2
slibc-0a5906ec25e6a93935e21221a99179238933b60a.tar.xz
typo + attributes
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'include/ctype.h')
-rw-r--r--include/ctype.h68
1 files changed, 34 insertions, 34 deletions
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__)));