[REG_UNSET_VALUE]: Define to the address of a static variable rather than to
authorJim Meyering <jim@meyering.net>
Sun, 11 Dec 1994 23:16:11 +0000 (23:16 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 11 Dec 1994 23:16:11 +0000 (23:16 +0000)
((char *) -1).  The latter got a warning on IRIX64.

regex.c

diff --git a/regex.c b/regex.c
index fe527dd229447be424d3af71bc629407d2f0865f..2d291b323e1645e53e5231ce313167063dae9521 100644 (file)
--- a/regex.c
+++ b/regex.c
@@ -1251,7 +1251,8 @@ typedef union
 
 
 /* Registers are set to a sentinel when they haven't yet matched.  */
-#define REG_UNSET_VALUE ((char *) -1)
+static char reg_unset_dummy;
+#define REG_UNSET_VALUE (&reg_unset_dummy)
 #define REG_UNSET(e) ((e) == REG_UNSET_VALUE)