avoid compiler warning

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I noticed this, thanks to cygwin 1.7's improved QoI ctype.h header.  (Hmm,
maybe I should file a glibc bug that the Linux ctype.h should offer the
same compiler warning when passing a char instead of an unsigned char to
the ctype macros.)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko3EWQACgkQ84KuGfSFAYBouACfeFIZMbPxWSNEnNXuunESSCbx
d7wAmwWO4kkyz+pyrlEUbdtlNihtT53h
=rUNJ
-----END PGP SIGNATURE-----

_______________________________________________
M4-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-patches
m4.patch420 (text/plain, 1.2 KB)
From db30dc297c6c4ba4d333120820d935304d804c46 Mon Sep 17 00:00:00 2001
From: Eric Blake <[email protected]>
Date: Mon, 15 Jun 2009 09:46:34 -0600
Subject: [PATCH] Avoid compiler warning.

* m4/macro.c (process_macro): Use correct type for isdigit.

Signed-off-by: Eric Blake <[email protected]>
---
 ChangeLog  |    5 +++++
 m4/macro.c |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3b356c1..bde4c2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-15  Eric Blake  <[email protected]>
+
+	Avoid compiler warning.
+	* m4/macro.c (process_macro): Use correct type for isdigit.
+
 2009-06-13  Eric Blake  <[email protected]>

 	Avoid snprintf link failures.
diff --git a/m4/macro.c b/m4/macro.c
index fc28cd3..76ccca7 100644
--- a/m4/macro.c
+++ b/m4/macro.c
@@ -740,7 +740,8 @@ process_macro (m4 *context, m4_symbol_value *value, m4_obstack *obs,
 	     syntax instead of $10; see
 	     http://lists.gnu.org/archive/html/m4-discuss/2006-08/msg00028.html
 	     for more discussion.  */
-	  if (m4_get_posixly_correct_opt (context) || !isdigit(text[1]))
+	  if (m4_get_posixly_correct_opt (context)
+	      || !isdigit (to_uchar (text[1])))
 	    {
 	      i = *text++ - '0';
 	      len--;
-- 
1.6.3.rc3.2.g4b51
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.