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 --- protocols/purple/purple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/purple') diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 6e9682ed..97d2a4ae 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -60,7 +60,7 @@ static gboolean purple_menu_cmp( const char *a, const char *b ) { while( *a == '_' ) a ++; while( *b == '_' ) b ++; - if( tolower( *a ) != tolower( *b ) ) + if( g_ascii_tolower( *a ) != g_ascii_tolower( *b ) ) return FALSE; a ++; @@ -1147,7 +1147,7 @@ static void *prplcb_notify_userinfo( PurpleConnection *gc, const char *who, Purp if( value ) { n = strlen( value ) - 1; - while( isspace( value[n] ) ) + while( g_ascii_isspace( value[n] ) ) n --; g_string_append_len( info, value, n + 1 ); } -- cgit v1.2.3