bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] Re: const qualifier violation in regex.c:re_comp()


From: Mark D. Baushke
Subject: [Bug-gnulib] Re: const qualifier violation in regex.c:re_comp()
Date: Tue, 05 Oct 2004 08:01:12 -0700

Hi Paul,

There is another change to regex.c that was reported against regex.c
that might be well to fix in the GNULIB version.

        Thanks,
        -- Mark

ChangeLog entry:

2004-04-07

        * regex.c: Revise "FREE_VAR" macro to eliminate C4090/C4022 warnings
        in Windows build with Visual C++ 6.0 compiler.
        (Original patch from Conrad T. Pino <address@hidden>.)

Index: lib/regex.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/regex.c,v
retrieving revision 1.84
diff -u -p -r1.84 regex.c
--- lib/regex.c 4 Oct 2004 21:00:42 -0000       1.84
+++ lib/regex.c 5 Oct 2004 14:57:42 -0000
@@ -4970,7 +4970,7 @@ weak_alias (__re_search_2, re_search_2)
 #ifdef INSIDE_RECURSION
 
 #ifdef MATCH_MAY_ALLOCATE
-# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
+# define FREE_VAR(var) if (var) (void)REGEX_FREE ((void *)var); var = NULL
 #else
 # define FREE_VAR(var) if (var) free (var); var = NULL
 #endif




reply via email to

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