diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-26 06:56:18 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-26 06:56:18 -0700 |
commit | 70b1b570bfba0c97b37870747eb4bc0ae665cf66 (patch) | |
tree | 0564d0d198b03f6026b191d02f1c59134ed17d13 /gas | |
parent | e67e940f5d9102fb452b87aca441a2829a67d66b (diff) | |
download | gdb-70b1b570bfba0c97b37870747eb4bc0ae665cf66.zip gdb-70b1b570bfba0c97b37870747eb4bc0ae665cf66.tar.gz gdb-70b1b570bfba0c97b37870747eb4bc0ae665cf66.tar.bz2 |
gas: Silence GCC 10 warning on tc-v850.c
PR gas/26044
* config/tc-v850.c (md_convert_frag): Replace fragP->fr_literal
with &fragP->fr_literal[0].
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-v850.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9a1dc3b..052d180 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,6 +1,12 @@ 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 * config/tc-crx.c (getreg_image): Change argument type to int. (md_convert_frag): Replace fragP->fr_literal with &fragP->fr_literal[0]. diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 536fe29..cf9831a 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; |