diff options
author | Russell Belfer <rb@github.com> | 2013-04-09 11:40:00 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-04-09 11:40:00 -0700 |
commit | 9da187e83d1b8ab513a43fd54a9fe2be11b1703f (patch) | |
tree | 5a0ad82e821540fe5b23ee24c6fe53c9a59aa804 /examples/network/index-pack.c | |
parent | 94750e8af246b2adf7bd5766e7e0da5fcf928d24 (diff) | |
download | libgit2-9da187e83d1b8ab513a43fd54a9fe2be11b1703f.tar.gz |
Fix clang warnings and improve checks
Diffstat (limited to 'examples/network/index-pack.c')
-rw-r--r-- | examples/network/index-pack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/network/index-pack.c b/examples/network/index-pack.c index 3fc4f3288..889305da8 100644 --- a/examples/network/index-pack.c +++ b/examples/network/index-pack.c @@ -23,7 +23,7 @@ // the indexing to finish in a worker thread static int index_cb(const git_transfer_progress *stats, void *data) { - data = data; + (void)data; printf("\rProcessing %d of %d", stats->indexed_objects, stats->total_objects); return 0; @@ -39,9 +39,10 @@ int index_pack(git_repository *repo, int argc, char **argv) ssize_t read_bytes; char buf[512]; - repo = repo; + (void)repo; + if (argc < 2) { - fprintf(stderr, "I need a packfile\n"); + fprintf(stderr, "usage: %s index-pack <packfile>\n", argv[-1]); return EXIT_FAILURE; } |