diff options
author | Kevin Ryde <user42@zip.com.au> | 2004-04-27 23:17:47 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2004-04-27 23:17:47 +0000 |
commit | f93df18fea2e514ef6d059edfde0aaa295dd87fc (patch) | |
tree | 2a4406023753de1791fbae4cdb6b40fca3b76460 | |
parent | 71df73ac43cc3019da9f232d80487b6fe47f3162 (diff) | |
download | guile-f93df18fea2e514ef6d059edfde0aaa295dd87fc.tar.gz |
(display_frame_expr),
Cast char to int for
ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
subscript. Reported by Andreas Vögele.
Also cast through unsigned char to avoid passing negatives to those
macros if input contains 8-bit values.
-rw-r--r-- | libguile/backtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c index ab96ba5d6..2eb4f2d22 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -1,5 +1,5 @@ /* Printing of backtraces and error messages - * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003 Free Software Foundation + * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -400,7 +400,7 @@ display_frame_expr (char *hdr, SCM exp, char *tlr, int indentation, SCM sport, S string = scm_strport_to_string (sport); /* Remove control characters */ for (i = 0; i < n; ++i) - if (iscntrl (SCM_STRING_CHARS (string)[i])) + if (iscntrl ((int) (unsigned char) SCM_STRING_CHARS (string)[i])) SCM_STRING_CHARS (string)[i] = ' '; /* Truncate */ if (indentation + n > SCM_BACKTRACE_WIDTH) |