diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2021-09-27 20:31:21 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2021-09-27 20:31:26 +0100 |
commit | e695879142a8e8b9f7e220a7919f38ad3ee614e6 (patch) | |
tree | c389be608e0687587cde8916d165e291f7285f97 /libctf/testsuite/libctf-writable | |
parent | b62d5edd0a5794a6ba142ed66dbba366546dc307 (diff) | |
download | binutils-e695879142a8e8b9f7e220a7919f38ad3ee614e6.zip binutils-e695879142a8e8b9f7e220a7919f38ad3ee614e6.tar.gz binutils-e695879142a8e8b9f7e220a7919f38ad3ee614e6.tar.bz2 |
libctf, testsuite: fix various warnings in tests
These warnings are all off by default, but if they do fire you get
spurious ERRORs when running make check-libctf.
libctf/ChangeLog
2021-09-27 Nick Alcock <nick.alcock@oracle.com>
* testsuite/libctf-lookup/enum-symbol.c: Remove unused label.
* testsuite/libctf-lookup/conflicting-type-syms.c: Remove unused
variables.
* testsuite/libctf-regression/pptrtab.c: Likewise.
* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
* testsuite/libctf-writable/pptrtab.c: Likewise.
* testsuite/libctf-writable/reserialize-strtab-corruption.c:
Likewise.
* testsuite/libctf-regression/nonstatic-var-section-ld-r.c: Fix
format string.
* testsuite/libctf-regression/nonstatic-var-section-ld.c:
Likewise.
* testsuite/libctf-regression/nonstatic-var-section-ld.lk: Adjust.
* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Fix
initializer.
Diffstat (limited to 'libctf/testsuite/libctf-writable')
3 files changed, 5 insertions, 4 deletions
diff --git a/libctf/testsuite/libctf-writable/pptrtab.c b/libctf/testsuite/libctf-writable/pptrtab.c index 68c3563..b8d1e63 100644 --- a/libctf/testsuite/libctf-writable/pptrtab.c +++ b/libctf/testsuite/libctf-writable/pptrtab.c @@ -7,7 +7,7 @@ main (int argc, char *argv[]) { ctf_dict_t *pfp; ctf_dict_t *cfp; - ctf_id_t base, base2, ptr, ptr2, type, last_type; + ctf_id_t base, base2, ptr, type, last_type; ctf_encoding_t encoding = { CTF_INT_SIGNED, 0, sizeof (int) }; ctf_encoding_t encoding2 = { CTF_INT_SIGNED, 0, sizeof (long) }; char *type_name; diff --git a/libctf/testsuite/libctf-writable/reserialize-strtab-corruption.c b/libctf/testsuite/libctf-writable/reserialize-strtab-corruption.c index 1593325..2c9ec8d 100644 --- a/libctf/testsuite/libctf-writable/reserialize-strtab-corruption.c +++ b/libctf/testsuite/libctf-writable/reserialize-strtab-corruption.c @@ -13,7 +13,6 @@ main (int argc, char *argv[]) ctf_snapshot_id_t snap; unsigned char *foo; size_t foo_size; - const char *bar; int err; char name[64]; diff --git a/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c b/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c index bdc3faa..7a2b88d 100644 --- a/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c +++ b/libctf/testsuite/libctf-writable/symtypetab-nonlinker-writeout.c @@ -174,10 +174,12 @@ try_maybe_reporting (int report) } *expected; struct ctf_symtype_expected expected_obj[] = { { "data_a", base2 }, { "data_b", base3 }, - { "data_c", base }, NULL }; + { "data_c", base }, + { NULL, 0 } }; struct ctf_symtype_expected expected_func[] = { { "func_a", func2 }, { "func_b", func3 }, - { "func_c", func }, NULL }; + { "func_c", func }, + { NULL, 0 } }; expected = expected_obj; while ((symtype = ctf_symbol_next (fp, &i, &symname, 0)) != CTF_ERR) |