Additional c99 elfxx-riscv.c fix

Message ID 20200318060813.5102-1-sebastian.huber@embedded-brains.de
State New
Headers show
Series
  • Additional c99 elfxx-riscv.c fix
Related show

Commit Message

Sebastian Huber March 18, 2020, 6:08 a.m.
Similar to 2d0e121701a95e0f37af02bc622393b1ccd88c76.

    	* elfxx-riscv.c (riscv_parse_subset): Don't use C99.
---
 bfd/elfxx-riscv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.16.4

Comments

Jim Wilson March 18, 2020, 10:24 p.m. | #1
On Tue, Mar 17, 2020 at 11:08 PM Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
>         * elfxx-riscv.c (riscv_parse_subset): Don't use C99.


This is OK.

Jim

Patch

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index dc6db0c307..b15fdee9c7 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1464,6 +1464,7 @@  riscv_parse_subset (riscv_parse_subset_t *rps,
 		    const char *arch)
 {
   const char *p = arch;
+  size_t i;
 
   if (strncmp (p, "rv32", 4) == 0)
     {
@@ -1490,7 +1491,7 @@  riscv_parse_subset (riscv_parse_subset_t *rps,
 
   /* Parse the different classes of extensions in the specified order.  */
 
-  for (size_t i = 0; i < ARRAY_SIZE (parse_config); ++i) {
+  for (i = 0; i < ARRAY_SIZE (parse_config); ++i) {
     p = riscv_parse_prefixed_ext (rps, arch, p, &parse_config[i]);
 
     if (p == NULL)