PATCH: two issues with int -> char casts.
Steve Dunham <[email protected]>
| Newsgroups | gmane.comp.web.amaya.devel |
|---|---|
| Message-ID | <[email protected]> |
Below is a patch for two instances where the output of getc() is assigned to a char and subsequently compared to EOF (the integer -1). This issue was caught by GCC on the ARM architecture, which has unsigned chars. (So the EOF comparison always fails.) Thanks, Steve Dunham [email protected] (Please CC replies, I'm not on the mailing list.) --- Amaya/amaya/trans.c.orig 2002-09-19 12:34:08.000000000 -0700 +++ Amaya/amaya/trans.c 2002-09-19 12:34:24.000000000 -0700 @@ -731,7 +731,7 @@ static ThotBool ExportSubTree (Element subTree, Document doc) { char tmpfilename[MAX_PATH]; - char charRead; + int charRead; FILE *inputFile = NULL; int len; ThotBool result = FALSE; --- Amaya/thotlib/image/xpmhandler.c.orig 2002-09-19 12:35:38.000000000 -0700 +++ Amaya/thotlib/image/xpmhandler.c 2002-09-19 12:35:54.000000000 -0700 @@ -170,7 +170,7 @@ ThotBool IsXpmFormat (char *fn) { FILE *f; - char c; + int c; ThotBool res; res = FALSE;