From 4bb975e1ad59a39460fe6b16eec5c7830f904b6b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 27 Aug 2009 10:56:53 -0600 Subject: [PATCH] scan-gram: avoid portability trap with ctype usage. * src/scan-gram.l (): Avoid compiler warning. Signed-off-by: Eric Blake (cherry picked from commit bbbbe221d7c2ff2fff88f7a0c8dbfee73f2e8a58) --- ChangeLog | 6 ++++++ src/scan-gram.l | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 73c1c3e7..9a7c0d2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-27 Eric Blake + + scan-gram: avoid portability trap with ctype usage. + * src/scan-gram.l (): + Avoid compiler warning. + 2009-08-27 Joel E. Denny tests: use perl for printing special sequences to files. diff --git a/src/scan-gram.l b/src/scan-gram.l index f0f8c279..f199ec38 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -561,7 +561,7 @@ splice (\\[ \f\t\v]*\n)* \\(.|\n) { char const *p = yytext + 1; /* Quote only if escaping won't make the character visible. */ - if (isspace (*p) && isprint (*p)) + if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p)) p = quote (p); else p = quotearg_style_mem (escape_quoting_style, p, 1); -- 2.45.2