summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-11-21 17:10:04 +0000
committerDavid Mitchell <davem@iabyn.com>2013-11-21 17:12:42 +0000
commit548d896a1f74160bfd003358c741a3f5d76343a9 (patch)
tree8e5935d6c725eea2c019bc313af6aad1bc49989b /handy.h
parent9e2f122b42a3b7e47394662655b97866ff6c3cb7 (diff)
downloadperl-548d896a1f74160bfd003358c741a3f5d76343a9.tar.gz
toLOWER_LC(), toUPPER_LC(): fix signedness
The are documented to return UV, but in one definition they return tolower()/toupper(), which on Linux return a signed value. So cast away the compiler warnings.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index 78e5284536..e7e8ca32d5 100644
--- a/handy.h
+++ b/handy.h
@@ -1278,8 +1278,8 @@ EXTCONST U32 PL_charclass[];
# define isWORDCHAR_LC(c) (FITS_IN_8_BITS(c) \
&& (isalnum((unsigned char)(c)) || (char)(c) == '_'))
# define isXDIGIT_LC(c) (FITS_IN_8_BITS(c) && isxdigit((unsigned char)(c)))
-# define toLOWER_LC(c) (FITS_IN_8_BITS(c) ? tolower((unsigned char)(c)) : (c))
-# define toUPPER_LC(c) (FITS_IN_8_BITS(c) ? toupper((unsigned char)(c)) : (c))
+# define toLOWER_LC(c) (FITS_IN_8_BITS(c) ? (UV)tolower((unsigned char)(c)) : (c))
+# define toUPPER_LC(c) (FITS_IN_8_BITS(c) ? (UV)toupper((unsigned char)(c)) : (c))
# else