[PATCH 1/3] git.c: Kill type mismatch warning.

From: Mark Wooding <mdw@distorted.org.uk>
Date: 2006-03-05 20:36:31
From: Mark Wooding <mdw@distorted.org.uk>

GCC objects when you pass a `char **' where a `const char **' is wanted.
The cast shuts the compiler up, and does the right thing generally.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
---

Unfortunately, the warning is fair enough.  I can pass a `T' where
someone was expecting a `const T', but that would mean that the callee
was expecting a `char *const *'.
---

 git.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git.c b/git.c
index a547dbd..69df070 100644
--- a/git.c
+++ b/git.c
@@ -261,7 +261,7 @@ static int cmd_log(int argc, char **argv
 	int show_parents = 0;
 	const char *commit_prefix = "commit ";
 
-	argc = setup_revisions(argc, argv, &rev, "HEAD");
+	argc = setup_revisions(argc, (const char **)argv, &rev, "HEAD");
 	while (1 < argc) {
 		char *arg = argv[1];
 		if (!strncmp(arg, "--pretty", 8)) {
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Mar 05 20:37:10 2006

This archive was generated by hypermail 2.1.8 : 2006-03-05 20:39:54 EST