diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2018-01-30 16:59:25 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2018-02-04 22:15:17 +0300 |
commit | 6d557551288a73e2cf4a2411515338d4a21d1ef7 (patch) | |
tree | 7e5a567e5a48c67bfb822f4c64ebfe5425371e82 /tests/template.fmt | |
parent | 029361ea16a9d55736b184292c86ef88da4e8205 (diff) |
tests: Silence warnings in template
- no previous prototype for ‘test_assert’
- no previous prototype for ‘test_count’
- unused parameter ‘b’ in test_count
- function declaration isn’t a prototype for main
Diffstat (limited to 'tests/template.fmt')
-rw-r--r-- | tests/template.fmt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/template.fmt b/tests/template.fmt index 4511e6d..209a714 100644 --- a/tests/template.fmt +++ b/tests/template.fmt @@ -7,11 +7,11 @@ // test stuff -void test_log(const char *s, uintmax_t v) {{ +static void test_log(const char *s, uintmax_t v) {{ printf("%s: %jd\n", s, v); }} -void test_assert(const char *file, unsigned line, +static void test_assert(const char *file, unsigned line, const char *s, uintmax_t v, uintmax_t e) {{ static const char *last[6] = {{0, 0}}; if (v != e || !(last[0] == s || last[1] == s || @@ -37,7 +37,8 @@ void test_assert(const char *file, unsigned line, // utility functions for traversals -int test_count(void *p, lfs_block_t b) {{ +static int __attribute__((used)) test_count(void *p, + lfs_block_t b __attribute__((unused))) {{ unsigned *u = (unsigned*)p; *u += 1; return 0; @@ -96,7 +97,7 @@ const struct lfs_config cfg = {{ // Entry point -int main() {{ +int main(void) {{ lfs_emubd_create(&cfg, "blocks"); {tests} |