From 88353c47f297769b7ef3dbdbe26beb94b5c59136 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 12 Mar 2010 16:26:36 +0000 Subject: [PATCH] 2010-03-12 Joel Sherrill * sp43/init.c: Readdress use of ctype methods per recommendation from D.J. Delorie on the newlib mailing list. We should pass an unsigned char into these methods. --- testsuites/sptests/ChangeLog | 6 ++++++ testsuites/sptests/sp43/init.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 2816584b1a..68c5511e0d 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,9 @@ +2010-03-12 Joel Sherrill + + * sp43/init.c: Readdress use of ctype methods per recommendation from + D.J. Delorie on the newlib mailing list. We should pass an unsigned + char into these methods. + 2010-03-10 Joel Sherrill * Makefile.am, configure.ac: Add new fatal error for configuring diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c index 5ff1a84259..6377fb3f9a 100644 --- a/testsuites/sptests/sp43/init.c +++ b/testsuites/sptests/sp43/init.c @@ -86,8 +86,8 @@ void change_name( else { printf( "(" ); for (c=newName ; *c ; ) { - if (isprint((int)*c)) printf( "%c", *c ); - else printf( "0x%02x", *c ); + if (isprint((unsigned char)*c)) printf( "%c", *c ); + else printf( "0x%02x", *c ); c++; if ( *c ) printf( "-" );