From 70b1b570bfba0c97b37870747eb4bc0ae665cf66 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 26 May 2020 06:56:18 -0700 Subject: [PATCH] gas: Silence GCC 10 warning on tc-v850.c PR gas/26044 * config/tc-v850.c (md_convert_frag): Replace fragP->fr_literal with &fragP->fr_literal[0]. --- gas/ChangeLog | 6 ++++++ gas/config/tc-v850.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9a1dc3b0ecf..052d180398a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-05-26 H.J. Lu + + PR gas/26044 + * config/tc-v850.c (md_convert_frag): Replace fragP->fr_literal + with &fragP->fr_literal[0]. + 2020-05-26 H.J. Lu PR gas/26044 diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 536fe290fab..cf9831ab6fe 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -1705,7 +1705,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, else if (fragP->fr_subtype == SUBYPTE_LOOP_16_22 + 1) { unsigned char * buffer = - (unsigned char *) (fragP->fr_fix + fragP->fr_literal); + (unsigned char *) (fragP->fr_fix + &fragP->fr_literal[0]); int loop_reg = (buffer[0] & 0x1f); /* Add -1.reg. */ @@ -1743,7 +1743,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, || fragP->fr_subtype == SUBYPTE_SA_9_17_22_32 + 1) { unsigned char *buffer = - (unsigned char *) (fragP->fr_fix + fragP->fr_literal); + (unsigned char *) (fragP->fr_fix + &fragP->fr_literal[0]); buffer[0] &= 0x0f; /* Use condition. */ buffer[0] |= 0xe0; -- 2.30.2