Not all platform/locale combinations gracefully handle calling the ctype macros with plain char; at any rate, it is undefined per POSIX. OK to apply?
From: Eric Blake <[email protected]> Date: Mon, 11 May 2009 11:08:39 -0600 Subject: [PATCH] xargs: avoid compiler warning * xargs/xargs.c (get_char_oct_or_hex_escape): Pass correct type to ctype macro. Signed-off-by: Eric Blake <[email protected]> --- ChangeLog | 6 ++++++ xargs/xargs.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b3f5f5..76063d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-11 Eric Blake <[email protected]> + + xargs: avoid compiler warning + * xargs/xargs.c (get_char_oct_or_hex_escape): Pass correct type to + ctype macro. + 2009-05-04 James Youngman <[email protected]> * find/util.c (get_info): Don't fall off the end of the function diff --git a/xargs/xargs.c b/xargs/xargs.c index 89d18c4..48b1cc0 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -1,6 +1,6 @@ /* xargs -- build and execute command lines from standard input Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005, 2006, - 2007, 2008 Free Software Foundation, Inc. + 2007, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -262,7 +262,7 @@ get_char_oct_or_hex_escape(const char *s) p = s+2; base = 16; } - else if (isdigit(s[1])) + else if (isdigit ((unsigned char) s[1])) { /* octal */ p = s+1; -- 1.6.2.4 _______________________________________________ Findutils-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/findutils-patches
