X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Fopt.h;h=5757778577e2079b31641f176dd6976fe11c4d3d;hp=a1adc41d2bfa6953067d41f3e5343f2a03398241;hb=6a6f64f541e5d09162e0ba8814e04feb13ff5e8f;hpb=b30c544bd1486e7b60b99259e3d0dcbc1ec9efd0 diff --git a/ccan/opt/opt.h b/ccan/opt/opt.h index a1adc41d..57577785 100644 --- a/ccan/opt/opt.h +++ b/ccan/opt/opt.h @@ -1,5 +1,6 @@ #ifndef CCAN_OPT_H #define CCAN_OPT_H +#include #include #include @@ -182,6 +183,14 @@ void opt_register_table(const struct opt_table *table, const char *desc); */ bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...)); +/** + * opt_free_table - free the table. + * + * This frees the internal memory. Call this as the last + * opt function. + */ +void opt_free_table(void); + /** * opt_log_stderr - print message to stderr. * @fmt: printf-style format. @@ -325,6 +334,6 @@ void _opt_register(const char *names, enum opt_type type, void *arg, const char *desc); /* We use this to get typechecking for OPT_SUBTABLE */ -static inline int _check_is_entry(struct opt_table *e) { return 0; } +static inline int _check_is_entry(struct opt_table *e UNUSED) { return 0; } #endif /* CCAN_OPT_H */