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

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

Commit Message

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

-- 
2.26.2

Patch

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 980a84f6cf..55e8ac0365 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-visium.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-visium.c b/gas/config/tc-visium.c
index fc6a41d9a4..3e48c7aefc 100644
--- a/gas/config/tc-visium.c
+++ b/gas/config/tc-visium.c
@@ -484,7 +484,7 @@  void
 md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED,
 		 fragS * fragP)
 {
-  char *buf = fragP->fr_literal + fragP->fr_fix;
+  char *buf = &fragP->fr_literal[0] + fragP->fr_fix;
   expressionS exp;
   fixS *fixP;