mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
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.
This commit is contained in:
parent
67338173a4
commit
c02d66610b
@ -1,3 +1,11 @@
|
||||
2020-03-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
|
||||
|
||||
* testsuite/ld-arm/non-contiguous-arm4.d: Fix expected output.
|
||||
|
@ -239,12 +239,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)
|
||||
|
@ -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)
|
||||
|
@ -217,12 +217,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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user