summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-04-26 11:29:05 +0200
committerschu <schu-github@schulog.org>2011-04-26 11:29:05 +0200
commit402a47a7fa3ab2b549c5183d1d5fc82d95f64663 (patch)
tree5878576f4878e33f878a9942e46329a1fc029a36 /src/refs.c
parent7c37aa3ac5eecd0e725d0207c0507c4f6836c0eb (diff)
downloadlibgit2-402a47a7fa3ab2b549c5183d1d5fc82d95f64663.tar.gz
Fix -Wunused-but-set-variable warnings
As of gcc 4.6 -Wall includes -Wunused-but-set-variable. Use GIT_UNUSED or remove actually unused variables to prevent those warnings.
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/refs.c b/src/refs.c
index 17ec2915f..e5fc79dc8 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -684,7 +684,7 @@ static int packed_loadloose(git_repository *repository)
/* Remove any loose references from the cache */
{
- const void *_unused;
+ const void *GIT_UNUSED(_unused);
git_reference *reference;
GIT_HASHTABLE_FOREACH(repository->references.loose_cache, _unused, reference,
@@ -868,7 +868,7 @@ static int packed_write(git_repository *repo)
/* Load all the packfile into a vector */
{
git_reference *reference;
- const void *_unused;
+ const void *GIT_UNUSED(_unused);
GIT_HASHTABLE_FOREACH(repo->references.packfile, _unused, reference,
git_vector_insert(&packing_list, reference); /* cannot fail: vector already has the right size */
@@ -1518,7 +1518,7 @@ int git_reference_listcb(git_repository *repo, unsigned int list_flags, int (*ca
/* list all the packed references first */
if (list_flags & GIT_REF_PACKED) {
const char *ref_name;
- void *_unused;
+ void *GIT_UNUSED(_unused);
if ((error = packed_load(repo)) < GIT_SUCCESS)
return error;
@@ -1597,7 +1597,7 @@ int git_repository__refcache_init(git_refcache *refs)
void git_repository__refcache_free(git_refcache *refs)
{
git_reference *reference;
- const void *_unused;
+ const void *GIT_UNUSED(_unused);
assert(refs);