From 6b13103dad92d505e038c268af66aeb04b7b4d87 Mon Sep 17 00:00:00 2001 From: dequis Date: Fri, 16 Jan 2015 16:50:23 -0300 Subject: Replace isdigit/isalpha/.../tolower/toupper with glib variants This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c --- irc_im.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'irc_im.c') diff --git a/irc_im.c b/irc_im.c index 9a44b3f7..c9f0efbc 100644 --- a/irc_im.c +++ b/irc_im.c @@ -72,7 +72,7 @@ static gboolean bee_irc_user_new( bee_t *bee, bee_user_t *bu ) else { char *s; - for( s = bu->ic->acc->tag; isalnum( *s ); s ++ ); + for( s = bu->ic->acc->tag; g_ascii_isalnum( *s ); s ++ ); /* Only use the tag if we got to the end of the string. (So allow alphanumerics only. Hopefully not too restrictive.) */ @@ -315,7 +315,7 @@ static gboolean bee_irc_user_fullname( bee_t *bee, bee_user_t *bu ) /* Strip newlines (unlikely, but IRC-unfriendly so they must go) TODO(wilmer): Do the same with away msgs again! */ for( s = iu->fullname; *s; s ++ ) - if( isspace( *s ) ) *s = ' '; + if( g_ascii_isspace( *s ) ) *s = ' '; if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) ) { -- cgit v1.2.3