bug-cvs
[Top][All Lists]
Advanced

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

Patch: lib/regex.c warnings, "free" calls


From: Conrad T. Pino
Subject: Patch: lib/regex.c warnings, "free" calls
Date: Wed, 7 Apr 2004 14:49:05 -0700

lib/ChangeLog entry:
2004-04-07  Conrad T. Pino  <address@hidden>

        * regex.c: Revise "FREE_VAR" macro to eliminate C4090/C4022 warnings
        in Windows build with Visual C++ 6.0 compiler.

Discussion for this patch begins with this message:
http://mail.gnu.org/archive/html/bug-cvs/2004-04/msg00043.html

Patch file is attached and patch file contents follows:

Index: lib/ChangeLog
===================================================================
RCS file: /cvs/ccvs/lib/ChangeLog,v
retrieving revision 1.262
diff -u -p -r1.262 ChangeLog
--- lib/ChangeLog       5 Apr 2004 01:06:36 -0000       1.262
+++ lib/ChangeLog       7 Apr 2004 21:31:40 -0000
@@ -1,3 +1,8 @@
+2004-04-07  Conrad T. Pino  <address@hidden>
+
+       * regex.c: Revise "FREE_VAR" macro to eliminate C4090/C4022 warnings
+       in Windows build with Visual C++ 6.0 compiler.
+
 2004-04-04  Derek Price  <address@hidden>
 
        * system.h: Correct comment.
Index: lib/regex.c
===================================================================
RCS file: /cvs/ccvs/lib/regex.c,v
retrieving revision 1.12
diff -u -p -r1.12 regex.c
--- lib/regex.c 8 Aug 2002 19:55:42 -0000       1.12
+++ lib/regex.c 7 Apr 2004 21:31:46 -0000
@@ -4001,7 +4001,7 @@ static boolean alt_match_null_string_p (
 
 /* Free everything we malloc.  */
 #ifdef MATCH_MAY_ALLOCATE
-#define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else
+#define FREE_VAR(var) if (var) (void) (REGEX_FREE ((void *) (var)), var = NULL)
 #define FREE_VARIABLES()                                               \
   do {                                                                 \
     REGEX_FREE_STACK (fail_stack.stack);                               \

Attachment: patch.txt
Description: Text document


reply via email to

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