Commit b2a4be1d42bf5e3433f0a97c2e80ce37d169cf55

Philip Kelley 2014-05-18T12:22:21

Merge pull request #2365 from kitbellew/fix-indexer-mmap Fix warning on uninitialized variable.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/indexer.c b/src/indexer.c
index ebfdffb..25c3d05 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -110,7 +110,7 @@ int git_indexer_new(
 	git_indexer *idx;
 	git_buf path = GIT_BUF_INIT, tmp_path = GIT_BUF_INIT;
 	static const char suff[] = "/pack";
-	int error, fd;
+	int error, fd = -1;
 
 	idx = git__calloc(1, sizeof(git_indexer));
 	GITERR_CHECK_ALLOC(idx);