gas: Silence GCC 10 warning on tc-v850.c

Message ID 20200526135656.428131-1-hjl.tools@gmail.com
State New
Headers show
Series
  • gas: Silence GCC 10 warning on tc-v850.c
Related show

Commit Message

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(-)

-- 
2.26.2

Patch

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9a1dc3b0ec..052d180398 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@ 
+2020-05-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+	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  <hongjiu.lu@intel.com>
 
 	PR gas/26044
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 536fe290fa..cf9831ab6f 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;