Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
32 files changed:
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_headers_no_cpp(struct manifest *m,
}
static void check_headers_no_cpp(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
char *contents;
char *tmpsrc, *tmpobj, *cmdout;
{
char *contents;
char *tmpsrc, *tmpobj, *cmdout;
}
static void check_depends_accurate(struct manifest *m,
}
static void check_depends_accurate(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
struct list_head *list;
unsigned int i, core_deps, test_deps;
{
struct list_head *list;
unsigned int i, core_deps, test_deps;
#include <ctype.h>
#include "build.h"
#include <ctype.h>
#include "build.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_depends_built(struct manifest *m,
}
static void check_depends_built(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
struct list_head *list;
{
struct list_head *list;
#include "reduce_features.h"
#include "build.h"
#include "reduce_features.h"
#include "build.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_depends_built_without_features(struct manifest *m,
}
static void check_depends_built_without_features(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *list;
struct score *score)
{
struct list_head *list;
/* FIXME: check this is still true once we reduce features. */
static void check_depends_exist(struct manifest *m,
/* FIXME: check this is still true once we reduce features. */
static void check_depends_exist(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
unsigned int i;
char **deps;
{
unsigned int i;
char **deps;
}
static void check_test_depends_exist(struct manifest *m,
}
static void check_test_depends_exist(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
unsigned int i;
struct score *score)
{
unsigned int i;
/* FIXME: We should have one example per function in header. */
static void extract_examples(struct manifest *m,
/* FIXME: We should have one example per function in header. */
static void extract_examples(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *f, *mainh = NULL; /* gcc complains uninitialized */
struct score *score)
{
struct ccan_file *f, *mainh = NULL; /* gcc complains uninitialized */
#include <ctype.h>
static void examples_relevant_check(struct manifest *m,
#include <ctype.h>
static void examples_relevant_check(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *f;
struct score *score)
{
struct ccan_file *f;
}
static void run_examples(struct manifest *m,
}
static void run_examples(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED, struct score *score)
{
struct ccan_file *i;
struct list_head *list;
{
struct ccan_file *i;
struct list_head *list;
#include <ctype.h>
static void check_hash_if(struct manifest *m,
#include <ctype.h>
static void check_hash_if(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
struct list_head *list;
const char *explanation =
{
struct list_head *list;
const char *explanation =
}
static void check_idempotent(struct manifest *m,
}
static void check_idempotent(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
#include <ctype.h>
static void check_info_compiles(struct manifest *m,
#include <ctype.h>
static void check_info_compiles(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
char *info_c_file, *info, *output;
int fd;
{
char *info_c_file, *info, *output;
int fd;
.needs = "info_exists"
};
.needs = "info_exists"
};
-static void create_info_template_doc(struct manifest *m, struct score *score)
+static void create_info_template_doc(struct manifest *m,
+ struct score *score UNNEEDED)
}
static void check_info_documentation_exists(struct manifest *m,
}
static void check_info_documentation_exists(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *infodocs = get_ccan_file_docs(m->info_file);
struct score *score)
{
struct list_head *infodocs = get_ccan_file_docs(m->info_file);
#include <ccan/noerr/noerr.h>
static void check_has_info(struct manifest *m,
#include <ccan/noerr/noerr.h>
static void check_has_info(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
if (m->info_file) {
struct score *score)
{
if (m->info_file) {
-static void create_info_template(struct manifest *m, struct score *score)
+static void create_info_template(struct manifest *m,
+ struct score *score UNNEEDED)
{
FILE *info;
const char *filename;
{
FILE *info;
const char *filename;
return tal_fmt(m, "'_info ported' says '%s'", msg);
}
return tal_fmt(m, "'_info ported' says '%s'", msg);
}
-static void check_info_ported(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+static void check_info_ported(struct manifest *m UNNEEDED,
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
score->pass = true;
score->score = 1;
{
score->pass = true;
score->score = 1;
#include <ccan/str/str.h>
static void check_info_summary_single_line(struct manifest *m,
#include <ccan/str/str.h>
static void check_info_summary_single_line(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *infodocs = get_ccan_file_docs(m->info_file);
struct score *score)
{
struct list_head *infodocs = get_ccan_file_docs(m->info_file);
}
static void check_license_comment(struct manifest *m,
}
static void check_license_comment(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
struct list_head *list;
{
struct list_head *list;
#include <err.h>
static void check_license_depends_compat(struct manifest *m,
#include <err.h>
static void check_license_depends_compat(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct manifest *i;
struct score *score)
{
struct manifest *i;
extern struct ccanlint license_exists;
static void check_has_license(struct manifest *m,
extern struct ccanlint license_exists;
static void check_has_license(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
char buf[PATH_MAX];
ssize_t len;
{
char buf[PATH_MAX];
ssize_t len;
#include <ccan/str/str.h>
static void check_license_file_compat(struct manifest *m,
#include <ccan/str/str.h>
static void check_license_file_compat(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *list;
struct score *score)
{
struct list_head *list;
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_includes_build(struct manifest *m,
}
static void check_includes_build(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
char *contents;
char *tmpsrc, *tmpobj, *cmdout;
{
char *contents;
char *tmpsrc, *tmpobj, *cmdout;
#include <ccan/noerr/noerr.h>
static void check_has_main_header(struct manifest *m,
#include <ccan/noerr/noerr.h>
static void check_has_main_header(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
#include <ctype.h>
#include "build.h"
#include <ctype.h>
#include "build.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void do_build(struct manifest *m,
}
static void do_build(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
char *errstr;
struct score *score)
{
char *errstr;
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_use_build(struct manifest *m,
}
static void check_use_build(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
char *contents;
char *tmpfile, *cmdout;
{
char *contents;
char *tmpfile, *cmdout;
}
static void check_trailing_whitespace(struct manifest *m,
}
static void check_trailing_whitespace(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *list;
struct score *score)
{
struct list_head *list;
#include <ctype.h>
#include "build.h"
#include <ctype.h>
#include "build.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_objs_build(struct manifest *m,
}
static void check_objs_build(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
}
static void build_objects_with_stringchecks(struct manifest *m,
}
static void build_objects_with_stringchecks(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *i;
struct score *score)
{
struct ccan_file *i;
#include "build.h"
static void check_objs_build_without_features(struct manifest *m,
#include "build.h"
static void check_objs_build_without_features(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
const char *flags = tal_fmt(score, "%s %s",
struct score *score)
{
const char *flags = tal_fmt(score, "%s %s",
}
static void do_reduce_features(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;
{
struct htable_option *options_used, *options_avail, *options;
struct htable_option_iter i;
#include "reduce_features.h"
#include "tests_compile.h"
#include "reduce_features.h"
#include "tests_compile.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
-char *test_lib_list(const struct manifest *m, enum compile_type ctype)
+char *test_lib_list(const struct manifest *m, enum compile_type ctype UNNEEDED)
{
unsigned int i;
char **libs;
{
unsigned int i;
char **libs;
REGISTER_TEST(tests_compile);
REGISTER_TEST(tests_compile);
-static const char *features_reduced(struct manifest *m)
+static const char *features_reduced(struct manifest *m UNNEEDED)
{
if (features_were_reduced)
return NULL;
{
if (features_were_reduced)
return NULL;
};
REGISTER_TEST(tests_exist);
};
REGISTER_TEST(tests_exist);
-static void handle_no_tests(struct manifest *m, struct score *score)
+static void handle_no_tests(struct manifest *m, struct score *score UNNEEDED)
{
FILE *run;
struct ccan_file *i;
{
FILE *run;
struct ccan_file *i;
}
static void check_tests_exist(struct manifest *m,
}
static void check_tests_exist(struct manifest *m,
- unsigned int *timeleft, struct score *score)
+ unsigned int *timeleft UNNEEDED,
+ struct score *score)
{
struct stat st;
char *test_dir = path_join(m, m->dir, "test");
{
struct stat st;
char *test_dir = path_join(m, m->dir, "test");
#include <ctype.h>
#include "reduce_features.h"
#include <ctype.h>
#include "reduce_features.h"
-static const char *can_run(struct manifest *m)
+static const char *can_run(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
{
if (safe_mode)
return "Safe mode enabled";
}
static void compile_test_helpers(struct manifest *m,
}
static void compile_test_helpers(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score,
const char *flags,
enum compile_type ctype)
struct score *score,
const char *flags,
enum compile_type ctype)
REGISTER_TEST(tests_helpers_compile);
REGISTER_TEST(tests_helpers_compile);
-static const char *features_reduced(struct manifest *m)
+static const char *features_reduced(struct manifest *m UNNEEDED)
{
if (features_were_reduced)
return NULL;
{
if (features_were_reduced)
return NULL;
/* FIXME: Run examples, too! */
static void do_run_tests_vg(struct manifest *m,
/* FIXME: Run examples, too! */
static void do_run_tests_vg(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *i;
struct score *score)
{
struct ccan_file *i;
}
static void do_leakcheck_vg(struct manifest *m,
}
static void do_leakcheck_vg(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *i;
struct score *score)
{
struct ccan_file *i;