Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
1ddb7420
Commit
1ddb7420
authored
Nov 06, 2016
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccanlint: mark unused parameters.
Signed-off-by:
Rusty Russell
<
rusty@rustcorp.com.au
>
parent
04bcddcc
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
67 additions
and
49 deletions
+67
-49
tools/ccanlint/tests/avoids_cpp_reserved.c
tools/ccanlint/tests/avoids_cpp_reserved.c
+3
-2
tools/ccanlint/tests/depends_accurate.c
tools/ccanlint/tests/depends_accurate.c
+2
-1
tools/ccanlint/tests/depends_build.c
tools/ccanlint/tests/depends_build.c
+3
-2
tools/ccanlint/tests/depends_build_without_features.c
tools/ccanlint/tests/depends_build_without_features.c
+2
-2
tools/ccanlint/tests/depends_exist.c
tools/ccanlint/tests/depends_exist.c
+3
-2
tools/ccanlint/tests/examples_exist.c
tools/ccanlint/tests/examples_exist.c
+1
-1
tools/ccanlint/tests/examples_relevant.c
tools/ccanlint/tests/examples_relevant.c
+1
-1
tools/ccanlint/tests/examples_run.c
tools/ccanlint/tests/examples_run.c
+1
-1
tools/ccanlint/tests/hash_if.c
tools/ccanlint/tests/hash_if.c
+2
-1
tools/ccanlint/tests/headers_idempotent.c
tools/ccanlint/tests/headers_idempotent.c
+2
-1
tools/ccanlint/tests/info_compiles.c
tools/ccanlint/tests/info_compiles.c
+2
-1
tools/ccanlint/tests/info_documentation_exists.c
tools/ccanlint/tests/info_documentation_exists.c
+3
-2
tools/ccanlint/tests/info_exists.c
tools/ccanlint/tests/info_exists.c
+3
-2
tools/ccanlint/tests/info_ported.c
tools/ccanlint/tests/info_ported.c
+3
-2
tools/ccanlint/tests/info_summary_single_line.c
tools/ccanlint/tests/info_summary_single_line.c
+1
-1
tools/ccanlint/tests/license_comment.c
tools/ccanlint/tests/license_comment.c
+2
-1
tools/ccanlint/tests/license_depends_compat.c
tools/ccanlint/tests/license_depends_compat.c
+1
-1
tools/ccanlint/tests/license_exists.c
tools/ccanlint/tests/license_exists.c
+2
-1
tools/ccanlint/tests/license_file_compat.c
tools/ccanlint/tests/license_file_compat.c
+1
-1
tools/ccanlint/tests/main_header_compiles.c
tools/ccanlint/tests/main_header_compiles.c
+3
-2
tools/ccanlint/tests/main_header_exists.c
tools/ccanlint/tests/main_header_exists.c
+2
-1
tools/ccanlint/tests/module_builds.c
tools/ccanlint/tests/module_builds.c
+2
-2
tools/ccanlint/tests/module_links.c
tools/ccanlint/tests/module_links.c
+3
-2
tools/ccanlint/tests/no_trailing_whitespace.c
tools/ccanlint/tests/no_trailing_whitespace.c
+1
-1
tools/ccanlint/tests/objects_build.c
tools/ccanlint/tests/objects_build.c
+3
-2
tools/ccanlint/tests/objects_build_with_stringchecks.c
tools/ccanlint/tests/objects_build_with_stringchecks.c
+1
-1
tools/ccanlint/tests/objects_build_without_features.c
tools/ccanlint/tests/objects_build_without_features.c
+1
-1
tools/ccanlint/tests/reduce_features.c
tools/ccanlint/tests/reduce_features.c
+2
-1
tools/ccanlint/tests/tests_compile.c
tools/ccanlint/tests/tests_compile.c
+3
-3
tools/ccanlint/tests/tests_exist.c
tools/ccanlint/tests/tests_exist.c
+3
-2
tools/ccanlint/tests/tests_helpers_compile.c
tools/ccanlint/tests/tests_helpers_compile.c
+3
-3
tools/ccanlint/tests/tests_pass_valgrind.c
tools/ccanlint/tests/tests_pass_valgrind.c
+2
-2
No files found.
tools/ccanlint/tests/avoids_cpp_reserved.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/depends_accurate.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/depends_build.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/depends_build_without_features.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/depends_exist.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/examples_exist.c
View file @
1ddb7420
...
@@ -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 */
...
...
tools/ccanlint/tests/examples_relevant.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/examples_run.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/hash_if.c
View file @
1ddb7420
...
@@ -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
=
...
...
tools/ccanlint/tests/headers_idempotent.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/info_compiles.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/info_documentation_exists.c
View file @
1ddb7420
...
@@ -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
);
...
...
tools/ccanlint/tests/info_exists.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/info_ported.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/info_summary_single_line.c
View file @
1ddb7420
...
@@ -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
);
...
...
tools/ccanlint/tests/license_comment.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/license_depends_compat.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/license_exists.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/license_file_compat.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/main_header_compiles.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/main_header_exists.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/module_builds.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/module_links.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/no_trailing_whitespace.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/objects_build.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/objects_build_with_stringchecks.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/objects_build_without_features.c
View file @
1ddb7420
...
@@ -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"
,
...
...
tools/ccanlint/tests/reduce_features.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/tests_compile.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/tests_exist.c
View file @
1ddb7420
...
@@ -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"
);
...
...
tools/ccanlint/tests/tests_helpers_compile.c
View file @
1ddb7420
...
@@ -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
;
...
...
tools/ccanlint/tests/tests_pass_valgrind.c
View file @
1ddb7420
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment