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 @@
#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";
......@@ -34,7 +34,8 @@ static struct ccan_file *main_header(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;
......
......@@ -70,7 +70,8 @@ static bool check_dep_includes(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;
......
......@@ -15,7 +15,7 @@
#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";
......@@ -76,7 +76,8 @@ char *build_submodule(struct manifest *m, const char *flags,
}
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;
......
......@@ -16,7 +16,7 @@
#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";
......@@ -24,7 +24,7 @@ static const char *can_build(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;
......
......@@ -46,7 +46,8 @@ static bool add_dep(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;
......@@ -77,7 +78,7 @@ static void check_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;
......
......@@ -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. */
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 */
......
......@@ -14,7 +14,7 @@
#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;
......
......@@ -188,7 +188,7 @@ static char *unexpected(struct ccan_file *i, const char *input,
}
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;
......
......@@ -15,7 +15,8 @@
#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 =
......
......@@ -178,7 +178,8 @@ static void check_idem(struct ccan_file *f, struct score *score)
}
static void check_idempotent(struct manifest *m,
unsigned int *timeleft, struct score *score)
unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct ccan_file *f;
......
......@@ -16,7 +16,8 @@
#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;
......
......@@ -25,7 +25,8 @@ static struct ccanlint info_documentation_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;
FILE *new;
......@@ -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,
unsigned int *timeleft,
unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *infodocs = get_ccan_file_docs(m->info_file);
......
......@@ -14,7 +14,7 @@
#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) {
......@@ -57,7 +57,8 @@ static const char template[] =
" return 1;\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;
const char *filename;
......
......@@ -27,8 +27,9 @@ static const char *can_build(struct manifest *m)
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;
......
......@@ -4,7 +4,7 @@
#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);
......
......@@ -36,7 +36,8 @@ static bool line_has_license_flavour(const char *line, const char *shortname)
}
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;
......
......@@ -11,7 +11,7 @@
#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;
......
......@@ -94,7 +94,8 @@ static void handle_license_link(struct manifest *m, struct score *score)
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;
......
......@@ -12,7 +12,7 @@
#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;
......
......@@ -13,7 +13,7 @@
#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";
......@@ -34,7 +34,8 @@ static struct ccan_file *main_header(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;
......
......@@ -14,7 +14,8 @@
#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)
{
struct ccan_file *f;
......
......@@ -15,7 +15,7 @@
#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";
......@@ -42,7 +42,7 @@ char *build_module(struct manifest *m,
}
static void do_build(struct manifest *m,
unsigned int *timeleft,
unsigned int *timeleft UNNEEDED,
struct score *score)
{
char *errstr;
......
......@@ -14,7 +14,7 @@
#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";
......@@ -65,7 +65,8 @@ static char *lib_list(const 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;
......
......@@ -21,7 +21,7 @@ static char *get_trailing_whitespace(const tal_t *ctx, const char *line)
}
static void check_trailing_whitespace(struct manifest *m,
unsigned int *timeleft,
unsigned int *timeleft UNNEEDED,
struct score *score)
{
struct list_head *list;
......
......@@ -15,7 +15,7 @@
#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";
......@@ -74,7 +74,8 @@ void build_objects(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;
......
......@@ -92,7 +92,7 @@ static struct ccan_file *get_main_header(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;
......
......@@ -4,7 +4,7 @@
#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",
......
......@@ -130,7 +130,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;
......
......@@ -16,7 +16,7 @@
#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";
......@@ -54,7 +54,7 @@ char *test_obj_list(const struct manifest *m, bool link_with_module,
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;
char **libs;
......@@ -211,7 +211,7 @@ struct ccanlint 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;
......
......@@ -22,7 +22,7 @@ static struct ccanlint 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;
......@@ -104,7 +104,8 @@ static void handle_no_tests(struct manifest *m, struct score *score)
}
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");
......
......@@ -14,7 +14,7 @@
#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";
......@@ -33,7 +33,7 @@ static bool compile(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)
......@@ -83,7 +83,7 @@ struct ccanlint 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;
......
......@@ -158,7 +158,7 @@ static const char *concat(struct score *score, char *bits[])
/* 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;
......@@ -199,7 +199,7 @@ static void do_run_tests_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;
......
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