From 3a55602eeca4ac8670e8698a7187e18b95683344 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 6 Mar 2007 20:44:17 -0500 Subject: General const correctness fixes We shouldn't attempt to assign constant strings into char*, as the string is not writable at runtime. Likewise we should always be treating unsigned values as unsigned values, not as signed values. Most of these are very straightforward. The only exception is the (unnecessary) xstrdup/free in builtin-branch.c for the detached head case. Since this is a user-level interactive type program and that particular code path is executed no more than once, I feel that the extra xstrdup call is well worth the easy elimination of this warning. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- interpolate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'interpolate.c') diff --git a/interpolate.c b/interpolate.c index f992ef7753..fb30694f47 100644 --- a/interpolate.c +++ b/interpolate.c @@ -55,7 +55,7 @@ int interpolate(char *result, int reslen, const char *src = orig; char *dest = result; int newlen = 0; - char *name, *value; + const char *name, *value; int namelen, valuelen; int i; char c; -- cgit v1.2.1