1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

(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.
This commit is contained in:
Kevin Ryde 2004-04-27 23:17:47 +00:00
parent 71df73ac43
commit f93df18fea

View file

@ -1,5 +1,5 @@
/* Printing of backtraces and error messages /* 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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); string = scm_strport_to_string (sport);
/* Remove control characters */ /* Remove control characters */
for (i = 0; i < n; ++i) 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] = ' '; SCM_STRING_CHARS (string)[i] = ' ';
/* Truncate */ /* Truncate */
if (indentation + n > SCM_BACKTRACE_WIDTH) if (indentation + n > SCM_BACKTRACE_WIDTH)