This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] metag: make an array's type unsigned char[]
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Cc: Trevor Saunders <tbsaunde+binutils at tbsaunde dot org>
- Date: Thu, 26 May 2016 07:25:50 -0400
- Subject: [PATCH] metag: make an array's type unsigned char[]
- Authentication-results: sourceware.org; auth=none
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Hi,
It contains values between 128 and 256 which fit in an unsigned char, but not a
signed char, so we should explicitly use unsigned char to not rely on how these
values are converted to signed char.
built and regtested cross to metag-elf, ok?
Trev
gas/ChangeLog:
2016-05-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-metag.c (metag_handle_align): Make the type of noop
unsigned char.
---
gas/config/tc-metag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c
index 1c45924..a6c7152 100644
--- a/gas/config/tc-metag.c
+++ b/gas/config/tc-metag.c
@@ -6847,7 +6847,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED,
void
metag_handle_align (fragS * fragP)
{
- static char const noop[4] = { 0xfe, 0xff, 0xff, 0xa0 };
+ static unsigned char const noop[4] = { 0xfe, 0xff, 0xff, 0xa0 };
int bytes, fix;
char *p;
--
2.8.1