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

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

Commit Message

* config/tc-mcore.c (md_convert_frag): Replace fragP->fr_literal
	with &fragP->fr_literal[0].
---
 gas/ChangeLog         | 5 +++++
 gas/config/tc-mcore.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.26.2

Patch

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7aba149af9..7264c8a061 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@ 
+2020-05-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/tc-mcore.c (md_convert_frag): Replace fragP->fr_literal
+	with &fragP->fr_literal[0].
+
 2020-05-25  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR gas/26041
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index b849a7c90f..da58e7b4c4 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -1725,7 +1725,7 @@  md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED,
   char *buffer;
   int targ_addr = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
 
-  buffer = fragP->fr_fix + fragP->fr_literal;
+  buffer = fragP->fr_fix + &fragP->fr_literal[0];
 
   switch (fragP->fr_subtype)
     {