gas: Silence GCC 10 warning on tc-visium.c
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 14:54:05 +0000 (07:54 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 26 May 2020 14:54:05 +0000 (07:54 -0700)
PR gas/26044
* config/tc-visium.c (md_convert_frag): Replace fragP->fr_literal
with &fragP->fr_literal[0].

gas/ChangeLog
gas/config/tc-visium.c

index 980a84f6cf758dddeb52190a7335651b474810b3..55e8ac036560c868dcc4bec176d65c9afba0ec84 100644 (file)
@@ -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
index fc6a41d9a4df7999396ebce48e5db47369b110c9..3e48c7aefc83f945998b31ebbfd6f2698ee406e4 100644 (file)
@@ -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;