[PATCH 1 of 6 v2] parsers: pass variable with correct constness to free

Henrik Stuart hg at hstuart.dk
Tue Sep 9 12:51:37 CDT 2014


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1410199446 -7200
#      Mon Sep 08 20:04:06 2014 +0200
# Node ID e6db2b7bcb27e528bef28932babd08dd4c05aae6
# Parent  c5df4af17110838b713d6c9ec3b824fb0b6c1b33
parsers: pass variable with correct constness to free

Normalized const-ness call to free to omit warnings with both gcc and
Microsoft Visual C++. Fix triggered by warning from Microsoft Visual C++ 2008.

diff -r c5df4af17110 -r e6db2b7bcb27 mercurial/parsers.c
--- a/mercurial/parsers.c	Thu Sep 04 09:59:23 2014 -0400
+++ b/mercurial/parsers.c	Mon Sep 08 20:04:06 2014 +0200
@@ -739,7 +739,7 @@
 		self->cache = NULL;
 	}
 	if (self->offsets) {
-		free(self->offsets);
+		free((char**)self->offsets);
 		self->offsets = NULL;
 	}
 	if (self->nt) {


More information about the Mercurial-devel mailing list