diff options
Diffstat (limited to 't/helper/test-oid-array.c')
-rw-r--r-- | t/helper/test-oid-array.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c index b16cd0b11b..aafe398ef0 100644 --- a/t/helper/test-oid-array.c +++ b/t/helper/test-oid-array.c @@ -1,14 +1,16 @@ #include "test-tool.h" -#include "cache.h" +#include "hex.h" #include "oid-array.h" +#include "setup.h" +#include "strbuf.h" -static int print_oid(const struct object_id *oid, void *data) +static int print_oid(const struct object_id *oid, void *data UNUSED) { puts(oid_to_hex(oid)); return 0; } -int cmd__oid_array(int argc, const char **argv) +int cmd__oid_array(int argc UNUSED, const char **argv UNUSED) { struct oid_array array = OID_ARRAY_INIT; struct strbuf line = STRBUF_INIT; @@ -35,5 +37,9 @@ int cmd__oid_array(int argc, const char **argv) else die("unknown command: %s", line.buf); } + + strbuf_release(&line); + oid_array_clear(&array); + return 0; } |