summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-07-05 11:54:16 +0300
committerKirill A. Shutemov <kirill@shutemov.name>2011-07-05 14:20:10 +0300
commitd6d877d20f76b3b6bf0e370cadd24e3321ce5371 (patch)
tree0fd493372366a6058436c6b00670b0674debe875 /examples
parent51cc50a37d1dbff2f877012073c13f6d24308bfe (diff)
downloadlibgit2-d6d877d20f76b3b6bf0e370cadd24e3321ce5371.tar.gz
examples/general: fix warnings on not handled reference type in switch
examples/general.c:402:5: warning: enumeration value ‘GIT_REF_INVALID’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_PACKED’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_HAS_PEEL’ not handled in switch [-Wswitch] examples/general.c:402:5: warning: enumeration value ‘GIT_REF_LISTALL’ not handled in switch [-Wswitch] Signe-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'examples')
-rw-r--r--examples/general.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/general.c b/examples/general.c
index db0b2db48..176f49feb 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -408,6 +408,9 @@ int main (int argc, char** argv)
case GIT_REF_SYMBOLIC:
printf("%s => %s\n", refname, git_reference_target(ref));
break;
+ default:
+ fprintf(stderr, "Unexpected reference type\n");
+ exit(1);
}
}