[PATCH] change some variable's type to op_err
tbsaunde+binutils@tbsaunde.org
tbsaunde+binutils@tbsaunde.org
Mon May 23 08:56:00 GMT 2016
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Hi,
They only hold values from the op_err enum, so it should be clearer to give
them the enum type.
built and regtested crosses to cr16-elf and crx-elf, ok?
Trev
gas/ChangeLog:
2016-05-23 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-cr16.c (check_range): Make type of retval op_err.
* config/tc-crx.c: Likewise.
---
gas/config/tc-cr16.c | 2 +-
gas/config/tc-crx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index b7fffa7..229f51a 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -1993,7 +1993,7 @@ static op_err
check_range (long *num, int bits, int unsigned flags, int update)
{
long min, max;
- int retval = OP_LEGAL;
+ op_err retval = OP_LEGAL;
long value = *num;
if (bits == 0 && value > 0) return OP_OUT_OF_RANGE;
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index 4b829c2..9a943d5 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -1325,7 +1325,7 @@ static op_err
check_range (long *num, int bits, int unsigned flags, int update)
{
uint32_t max;
- int retval = OP_LEGAL;
+ op_err retval = OP_LEGAL;
int bin;
uint32_t upper_64kb = 0xffff0000;
uint32_t value = *num;
--
2.8.1
More information about the Binutils
mailing list