m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

avoid compiler warning


From: Eric Blake
Subject: avoid compiler warning
Date: Mon, 15 Jun 2009 21:28:36 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

-----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             address@hidden
-----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-----
>From db30dc297c6c4ba4d333120820d935304d804c46 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
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 <address@hidden>
---
 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  <address@hidden>
+
+       Avoid compiler warning.
+       * m4/macro.c (process_macro): Use correct type for isdigit.
+
 2009-06-13  Eric Blake  <address@hidden>

        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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]