Commit d75074f4c02e8d8928d20261a891d94d26d41ea7

Michael Schubert 2012-09-22T12:29:16

Fix -Wmaybe-uninitialized warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/checkout.c b/src/checkout.c
index ea5e79a..7cf9fe0 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -59,7 +59,7 @@ static int blob_content_to_file(
 	mode_t entry_filemode,
 	git_checkout_opts *opts)
 {
-	int error, nb_filters = 0;
+	int error = -1, nb_filters = 0;
 	mode_t file_mode = opts->file_mode;
 	bool dont_free_filtered = false;
 	git_buf unfiltered = GIT_BUF_INIT, filtered = GIT_BUF_INIT;