From 4413bbd3d1689a23f441cbdca898b99d802bb6d6 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 aaeb4440..fc9a2745 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 93e0d103..bcb7209b 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -618,7 +618,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.47.2