Silence warnings due to plugin API change
authorAlan Modra <amodra@gmail.com>
Fri, 20 Mar 2020 02:27:42 +0000 (12:57 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 20 Mar 2020 02:29:54 +0000 (12:59 +1030)
* 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.

ld/ChangeLog
ld/testplug.c
ld/testplug2.c
ld/testplug3.c
ld/testplug4.c

index 050bb31002038f7b1651141290dae169248edeb8..16159d43f63a0b726403b6620177c47d6087ec5d 100644 (file)
@@ -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.
index 9dd0b91e45bec056ea530cfc00e04416469d34e1..c126f0360736b8a13e12bd1c4026c42a167c3f45 100644 (file)
@@ -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)
index ecd9a44d7310d06b3fbb6b158cb8cc373ee0a3c7..27553d07813b8e291caed595399b155c0e6ba94a 100644 (file)
@@ -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)
index 05fdca02e25c7a6250091bfe1328068cbfaef5bd..928f4d68426a55842a81f706950827bd56d7dbe2 100644 (file)
@@ -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)
index adaedf47c3fa131f8c9f30a5457f020bf2b75a4a..ca899b11da1da0f8bc8e06b5a07563e04f7640ba 100644 (file)
@@ -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)
This page took 0.027493 seconds and 4 git commands to generate.