gas: Silence GCC 10 warning on tc-cr16.c
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 25 May 2020 23:17:50 +0000 (16:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 25 May 2020 23:19:49 +0000 (16:19 -0700)
* config/tc-cr16.c (md_convert_frag): Replace fragP->fr_literal
with &fragP->fr_literal[0].

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

index 1b0ec36dec2117fb3d187aef2593ee44ecd1845b..96c78092a04e84f85428f07cd5f1217d6167f0e0 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-cr16.c (md_convert_frag): Replace fragP->fr_literal
+       with &fragP->fr_literal[0].
+
 2020-05-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-csky.c (md_convert_frag): Replace fragp->fr_literal
index 7a8f33b889756a160a5ff9b7f20ea3adc7714c91..901838398ecd38af97a00230b77a1a976f8c4883 100644 (file)
@@ -642,7 +642,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, fragS *fragP)
 {
   /* 'opcode' points to the start of the instruction, whether
      we need to change the instruction's fixed encoding.  */
-  char *opcode = fragP->fr_literal + fragP->fr_fix;
+  char *opcode = &fragP->fr_literal[0] + fragP->fr_fix;
   bfd_reloc_code_real_type reloc;
 
   subseg_change (sec, 0);