]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/reduce_features.c
fdpass: fix complilation on FreeBSD.
[ccan] / tools / ccanlint / tests / reduce_features.c
index b46c85fcfef081c685c74f673436f12d39e9ab28..89e615957010908ea3aa9070f75077126ae1feb8 100644 (file)
@@ -37,7 +37,8 @@ static bool option_cmp(const char *name1, const char *name2)
        return streq(name1, name2);
 }
 
-HTABLE_DEFINE_TYPE(char, option_name, option_hash, option_cmp, htable_option);
+HTABLE_DEFINE_NODUPS_TYPE(char, option_name, option_hash, option_cmp,
+                         htable_option);
 
 static struct htable_option *htable_option_new(void)
 {
@@ -130,7 +131,8 @@ static struct htable_option *get_config_options(struct manifest *m)
 }
 
 static void do_reduce_features(struct manifest *m,
-                              unsigned int *timeleft, struct score *score)
+                              unsigned int *timeleft UNNEEDED,
+                              struct score *score)
 {
        struct htable_option *options_used, *options_avail, *options;
        struct htable_option_iter i;
@@ -180,6 +182,7 @@ static void do_reduce_features(struct manifest *m,
                err(1, "Creating reduced-features/config.h");
        if (!write_all(fd, hdr, strlen(hdr)))
                err(1, "Writing reduced-features/config.h");
+       htable_option_free(options);
        close(fd);
        features_were_reduced = true;
 }