summaryrefslogtreecommitdiff
path: root/examples/general.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-07-05 12:00:18 +0300
committerKirill A. Shutemov <kirill@shutemov.name>2011-07-05 14:20:10 +0300
commit6f2b0a3ae2fd57dc52d2e84367b51cd06ba9a11c (patch)
tree68863820bf0c8c96f3a7452f79b9549ead5f8e9e /examples/general.c
parentd6d877d20f76b3b6bf0e370cadd24e3321ce5371 (diff)
downloadlibgit2-6f2b0a3ae2fd57dc52d2e84367b51cd06ba9a11c.tar.gz
examples/general: fix misc warnings
examples/general.c:393:25: warning: unused variable ‘reftarget’ [-Wunused-variable] examples/general.c:357:19: warning: unused variable ‘e’ [-Wunused-variable] examples/general.c:444:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'examples/general.c')
-rw-r--r--examples/general.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/general.c b/examples/general.c
index 176f49feb..91b6ee859 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -354,7 +354,7 @@ int main (int argc, char** argv)
printf("\n*Index Walking*\n");
git_index *index;
- unsigned int i, e, ecount;
+ unsigned int i, ecount;
// You can either open the index from the standard location in an open repository, as we're doing
// here, or you can open and manipulate any index file with `git_index_open_bare()`. The index
@@ -390,7 +390,7 @@ int main (int argc, char** argv)
git_strarray ref_list;
git_reference_listall(&ref_list, repo, GIT_REF_LISTALL);
- const char *refname, *reftarget;
+ const char *refname;
git_reference *ref;
// Now that we have the list of reference names, we can lookup each ref one at a time and
@@ -441,5 +441,7 @@ int main (int argc, char** argv)
// Finally, when you're done with the repository, you can free it as well.
git_repository_free(repo);
+
+ return 0;
}