aboutsummaryrefslogtreecommitdiff
path: root/ld/testplug2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-03-20 12:57:42 +1030
committerAlan Modra <amodra@gmail.com>2020-03-20 12:59:54 +1030
commitc02d66610b3b79f6fb5052e8890969bc7185b7be (patch)
tree1ce3fcdd46c75e8731c6466df0777f9f12ee9b75 /ld/testplug2.c
parent67338173a49204a2097ca1e2c63c6bc1fe972c3e (diff)
downloadgdb-c02d66610b3b79f6fb5052e8890969bc7185b7be.zip
gdb-c02d66610b3b79f6fb5052e8890969bc7185b7be.tar.gz
gdb-c02d66610b3b79f6fb5052e8890969bc7185b7be.tar.bz2
Silence warnings due to plugin API change
* testplug.c (parse_symdefstr): Use %hhi to read sym->def, and clear new fields. * testplug2.c (parse_symdefstr): Likewise. * testplug3.c (parse_symdefstr): Likewise. * testplug4.c (parse_symdefstr): Likewise.
Diffstat (limited to 'ld/testplug2.c')
-rw-r--r--ld/testplug2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/testplug2.c b/ld/testplug2.c
index ecd9a44..27553d0 100644
--- a/ld/testplug2.c
+++ b/ld/testplug2.c
@@ -218,12 +218,15 @@ parse_symdefstr (const char *str, struct ld_plugin_symbol *sym)
/* Finally we'll use sscanf to parse the numeric fields, then
we'll split out the strings which we need to allocate separate
storage for anyway so that we can add nul termination. */
- n = sscanf (colon2 + 1, "%i:%i:%lli", &sym->def, &sym->visibility, &size);
+ n = sscanf (colon2 + 1, "%hhi:%i:%lli", &sym->def, &sym->visibility, &size);
if (n != 3)
return LDPS_ERR;
/* Parsed successfully, so allocate strings and fill out fields. */
sym->size = size;
+ sym->unused = 0;
+ sym->section_kind = 0;
+ sym->symbol_type = 0;
sym->resolution = LDPR_UNKNOWN;
sym->name = malloc (colon1 - str + 1);
if (!sym->name)