[m-rev.] diff: avoid a C compiler warning on cygwin

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 4 18:41:02 AEDT 2011


Branches: main, 11.01

util/mkinit_erl.c:
 	Avoid a C compiler warning on Cygwin regarding a character
 	being used as an array subscript.

Julien.

Index: mkinit_erl.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/util/mkinit_erl.c,v
retrieving revision 1.4
diff -u -r1.4 mkinit_erl.c
--- mkinit_erl.c	17 Aug 2007 02:08:40 -0000	1.4
+++ mkinit_erl.c	4 Jan 2011 07:39:37 -0000
@@ -488,7 +488,7 @@

          /* Remove trailing whitespace. */
          len = strlen(line);
-        while (len > 0 && isspace(line[len - 1])) {
+        while (len > 0 && isspace((int)line[len - 1])) {
              line[len - 1] = '\0';
              len--;
          }

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list