Commit 1ddb7420 authored by Rusty Russell's avatar Rusty Russell

ccanlint: mark unused parameters.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 04bcddcc
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -34,7 +34,8 @@ static struct ccan_file *main_header(struct manifest *m) ...@@ -34,7 +34,8 @@ static struct ccan_file *main_header(struct manifest *m)
} }
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 *contents;
char *tmpsrc, *tmpobj, *cmdout; char *tmpsrc, *tmpobj, *cmdout;
......
...@@ -70,7 +70,8 @@ static bool check_dep_includes(struct manifest *m, ...@@ -70,7 +70,8 @@ static bool check_dep_includes(struct manifest *m,
} }
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; struct list_head *list;
unsigned int i, core_deps, test_deps; unsigned int i, core_deps, test_deps;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <ctype.h> #include <ctype.h>
#include "build.h" #include "build.h"
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -76,7 +76,8 @@ char *build_submodule(struct manifest *m, const char *flags, ...@@ -76,7 +76,8 @@ char *build_submodule(struct manifest *m, const char *flags,
} }
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;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "reduce_features.h" #include "reduce_features.h"
#include "build.h" #include "build.h"
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -24,7 +24,7 @@ static const char *can_build(struct manifest *m) ...@@ -24,7 +24,7 @@ static const char *can_build(struct manifest *m)
} }
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 score *score)
{ {
struct list_head *list; struct list_head *list;
......
...@@ -46,7 +46,8 @@ static bool add_dep(struct manifest *m, ...@@ -46,7 +46,8 @@ static bool add_dep(struct manifest *m,
/* FIXME: check this is still true once we reduce features. */ /* FIXME: check this is still true once we reduce features. */
static void check_depends_exist(struct manifest *m, static void check_depends_exist(struct manifest *m,
unsigned int *timeleft, struct score *score) unsigned int *timeleft UNNEEDED,
struct score *score)
{ {
unsigned int i; unsigned int i;
char **deps; char **deps;
...@@ -77,7 +78,7 @@ static void check_depends_exist(struct manifest *m, ...@@ -77,7 +78,7 @@ static void check_depends_exist(struct manifest *m,
} }
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) struct score *score)
{ {
unsigned int i; unsigned int i;
......
...@@ -62,7 +62,7 @@ static char *add_example(struct manifest *m, struct ccan_file *source, ...@@ -62,7 +62,7 @@ static char *add_example(struct manifest *m, struct ccan_file *source,
/* FIXME: We should have one example per function in header. */ /* FIXME: We should have one example per function in header. */
static void extract_examples(struct manifest *m, static void extract_examples(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct ccan_file *f, *mainh = NULL; /* gcc complains uninitialized */ struct ccan_file *f, *mainh = NULL; /* gcc complains uninitialized */
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <ctype.h> #include <ctype.h>
static void examples_relevant_check(struct manifest *m, static void examples_relevant_check(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct ccan_file *f; struct ccan_file *f;
......
...@@ -188,7 +188,7 @@ static char *unexpected(struct ccan_file *i, const char *input, ...@@ -188,7 +188,7 @@ static char *unexpected(struct ccan_file *i, const char *input,
} }
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 ccan_file *i;
struct list_head *list; struct list_head *list;
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
#include <ctype.h> #include <ctype.h>
static void check_hash_if(struct manifest *m, 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; struct list_head *list;
const char *explanation = const char *explanation =
......
...@@ -178,7 +178,8 @@ static void check_idem(struct ccan_file *f, struct score *score) ...@@ -178,7 +178,8 @@ static void check_idem(struct ccan_file *f, struct score *score)
} }
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)
{ {
struct ccan_file *f; struct ccan_file *f;
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#include <ctype.h> #include <ctype.h>
static void check_info_compiles(struct manifest *m, 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; char *info_c_file, *info, *output;
int fd; int fd;
......
...@@ -25,7 +25,8 @@ static struct ccanlint info_documentation_exists = { ...@@ -25,7 +25,8 @@ static struct ccanlint info_documentation_exists = {
.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)
{ {
int fd; int fd;
FILE *new; FILE *new;
...@@ -71,7 +72,7 @@ static void create_info_template_doc(struct manifest *m, struct score *score) ...@@ -71,7 +72,7 @@ static void create_info_template_doc(struct manifest *m, struct score *score)
} }
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 score *score)
{ {
struct list_head *infodocs = get_ccan_file_docs(m->info_file); struct list_head *infodocs = get_ccan_file_docs(m->info_file);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <ccan/noerr/noerr.h> #include <ccan/noerr/noerr.h>
static void check_has_info(struct manifest *m, static void check_has_info(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
if (m->info_file) { if (m->info_file) {
...@@ -57,7 +57,8 @@ static const char template[] = ...@@ -57,7 +57,8 @@ static const char template[] =
" return 1;\n" " return 1;\n"
"}\n"; "}\n";
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; FILE *info;
const char *filename; const char *filename;
......
...@@ -27,8 +27,9 @@ static const char *can_build(struct manifest *m) ...@@ -27,8 +27,9 @@ static const char *can_build(struct manifest *m)
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, static void check_info_ported(struct manifest *m UNNEEDED,
unsigned int *timeleft, struct score *score) unsigned int *timeleft UNNEEDED,
struct score *score)
{ {
score->pass = true; score->pass = true;
score->score = 1; score->score = 1;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <ccan/str/str.h> #include <ccan/str/str.h>
static void check_info_summary_single_line(struct manifest *m, static void check_info_summary_single_line(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct list_head *infodocs = get_ccan_file_docs(m->info_file); struct list_head *infodocs = get_ccan_file_docs(m->info_file);
......
...@@ -36,7 +36,8 @@ static bool line_has_license_flavour(const char *line, const char *shortname) ...@@ -36,7 +36,8 @@ static bool line_has_license_flavour(const char *line, const char *shortname)
} }
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;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <err.h> #include <err.h>
static void check_license_depends_compat(struct manifest *m, static void check_license_depends_compat(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct manifest *i; struct manifest *i;
......
...@@ -94,7 +94,8 @@ static void handle_license_link(struct manifest *m, struct score *score) ...@@ -94,7 +94,8 @@ static void handle_license_link(struct manifest *m, struct score *score)
extern struct ccanlint license_exists; extern struct ccanlint license_exists;
static void check_has_license(struct manifest *m, 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]; char buf[PATH_MAX];
ssize_t len; ssize_t len;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <ccan/str/str.h> #include <ccan/str/str.h>
static void check_license_file_compat(struct manifest *m, static void check_license_file_compat(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct list_head *list; struct list_head *list;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -34,7 +34,8 @@ static struct ccan_file *main_header(struct manifest *m) ...@@ -34,7 +34,8 @@ static struct ccan_file *main_header(struct manifest *m)
} }
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 *contents;
char *tmpsrc, *tmpobj, *cmdout; char *tmpsrc, *tmpobj, *cmdout;
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#include <ccan/noerr/noerr.h> #include <ccan/noerr/noerr.h>
static void check_has_main_header(struct manifest *m, static void check_has_main_header(struct manifest *m,
unsigned int *timeleft, struct score *score) unsigned int *timeleft UNNEEDED,
struct score *score)
{ {
struct ccan_file *f; struct ccan_file *f;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <ctype.h> #include <ctype.h>
#include "build.h" #include "build.h"
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -42,7 +42,7 @@ char *build_module(struct manifest *m, ...@@ -42,7 +42,7 @@ char *build_module(struct manifest *m,
} }
static void do_build(struct manifest *m, static void do_build(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
char *errstr; char *errstr;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -65,7 +65,8 @@ static char *lib_list(const struct manifest *m) ...@@ -65,7 +65,8 @@ static char *lib_list(const struct manifest *m)
} }
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 *contents;
char *tmpfile, *cmdout; char *tmpfile, *cmdout;
......
...@@ -21,7 +21,7 @@ static char *get_trailing_whitespace(const tal_t *ctx, const char *line) ...@@ -21,7 +21,7 @@ static char *get_trailing_whitespace(const tal_t *ctx, const char *line)
} }
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 score *score)
{ {
struct list_head *list; struct list_head *list;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <ctype.h> #include <ctype.h>
#include "build.h" #include "build.h"
static const char *can_build(struct manifest *m) static const char *can_build(struct manifest *m UNNEEDED)
{ {
if (safe_mode) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -74,7 +74,8 @@ void build_objects(struct manifest *m, ...@@ -74,7 +74,8 @@ void build_objects(struct manifest *m,
} }
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)
{ {
const char *flags; const char *flags;
......
...@@ -92,7 +92,7 @@ static struct ccan_file *get_main_header(struct manifest *m) ...@@ -92,7 +92,7 @@ static struct ccan_file *get_main_header(struct manifest *m)
} }
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 score *score)
{ {
struct ccan_file *i; struct ccan_file *i;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "build.h" #include "build.h"
static void check_objs_build_without_features(struct manifest *m, static void check_objs_build_without_features(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
const char *flags = tal_fmt(score, "%s %s", const char *flags = tal_fmt(score, "%s %s",
......
...@@ -130,7 +130,8 @@ static struct htable_option *get_config_options(struct manifest *m) ...@@ -130,7 +130,8 @@ static struct htable_option *get_config_options(struct manifest *m)
} }
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 *options_used, *options_avail, *options;
struct htable_option_iter i; struct htable_option_iter i;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "reduce_features.h" #include "reduce_features.h"
#include "tests_compile.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) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -54,7 +54,7 @@ char *test_obj_list(const struct manifest *m, bool link_with_module, ...@@ -54,7 +54,7 @@ char *test_obj_list(const struct manifest *m, bool link_with_module,
return list; return list;
} }
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; unsigned int i;
char **libs; char **libs;
...@@ -211,7 +211,7 @@ struct ccanlint tests_compile = { ...@@ -211,7 +211,7 @@ struct ccanlint tests_compile = {
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) if (features_were_reduced)
return NULL; return NULL;
......
...@@ -22,7 +22,7 @@ static struct ccanlint tests_exist = { ...@@ -22,7 +22,7 @@ static struct ccanlint tests_exist = {
}; };
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; FILE *run;
struct ccan_file *i; struct ccan_file *i;
...@@ -104,7 +104,8 @@ static void handle_no_tests(struct manifest *m, struct score *score) ...@@ -104,7 +104,8 @@ static void handle_no_tests(struct manifest *m, struct score *score)
} }
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; struct stat st;
char *test_dir = path_join(m, m->dir, "test"); char *test_dir = path_join(m, m->dir, "test");
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <ctype.h> #include <ctype.h>
#include "reduce_features.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) if (safe_mode)
return "Safe mode enabled"; return "Safe mode enabled";
...@@ -33,7 +33,7 @@ static bool compile(struct manifest *m, ...@@ -33,7 +33,7 @@ static bool compile(struct manifest *m,
} }
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, struct score *score,
const char *flags, const char *flags,
enum compile_type ctype) enum compile_type ctype)
...@@ -83,7 +83,7 @@ struct ccanlint tests_helpers_compile = { ...@@ -83,7 +83,7 @@ struct ccanlint tests_helpers_compile = {
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) if (features_were_reduced)
return NULL; return NULL;
......
...@@ -158,7 +158,7 @@ static const char *concat(struct score *score, char *bits[]) ...@@ -158,7 +158,7 @@ static const char *concat(struct score *score, char *bits[])
/* FIXME: Run examples, too! */ /* FIXME: Run examples, too! */
static void do_run_tests_vg(struct manifest *m, static void do_run_tests_vg(struct manifest *m,
unsigned int *timeleft, unsigned int *timeleft UNNEEDED,
struct score *score) struct score *score)
{ {
struct ccan_file *i; struct ccan_file *i;
...@@ -199,7 +199,7 @@ static void do_run_tests_vg(struct manifest *m, ...@@ -199,7 +199,7 @@ static void do_run_tests_vg(struct manifest *m,
} }
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 score *score)
{ {
struct ccan_file *i; struct ccan_file *i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment