This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Avoid signed/unsigned warnings in tc-arm.c
- From: Khem Raj <kraj at mvista dot com>
- To: binutils at sourceware dot org
- Date: Thu, 23 Jun 2005 12:46:39 -0700
- Subject: PATCH: Avoid signed/unsigned warnings in tc-arm.c
Hi
This patch gets rid of few warnings in tc-arm.c while compiling gas with
gcc 4.0. The build was failing becasue warnings are treated as errors
while compiling this file
Is it ok?
Thanks
-Khem
? diff
? doc/as.info
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/ChangeLog,v
retrieving revision 1.2578
diff -u -r1.2578 ChangeLog
--- ChangeLog 23 Jun 2005 11:40:28 -0000 1.2578
+++ ChangeLog 23 Jun 2005 19:42:49 -0000
@@ -1,3 +1,10 @@
+2005-06-23 Khem Raj <kraj@mvista.com>
+
+ * config/tc-arm.c (md_assemble):Avoid signed/unsigned argument
+ warnings.
+ (parse_operands):Likewise.
+ (parse_address):Likewise.
+
2005-06-23 Ben Elliston <bje@gnu.org>
* config/m68k-parse.h: Use ISO C90.
Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.210
diff -u -r1.210 tc-arm.c
--- config/tc-arm.c 13 Jun 2005 15:34:37 -0000 1.210
+++ config/tc-arm.c 23 Jun 2005 19:42:49 -0000
@@ -3238,7 +3238,7 @@
if (skip_past_char (&p, '{') == SUCCESS)
{
/* [Rn], {expr} - unindexed, with option */
- if (parse_immediate (&p, &inst.operands[i].imm,
+ if (parse_immediate (&p, (int*)&inst.operands[i].imm,
0, 255, TRUE) == FAIL)
return FAIL;
@@ -3569,7 +3569,7 @@
static int
parse_operands (char *str, const char *pattern)
{
- unsigned const char *upat = pattern;
+ unsigned const char *upat = ( unsigned const char *)pattern;
char *backtrack_pos = 0;
const char *backtrack_error = 0;
int i, val, backtrack_index = 0;
@@ -3791,11 +3791,11 @@
break;
case OP_VRSLST:
- val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 0);
+ val = parse_vfp_reg_list (&str, (int*)&inst.operands[i].reg, 0);
break;
case OP_VRDLST:
- val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 1);
+ val = parse_vfp_reg_list (&str, (int*)&inst.operands[i].reg, 1);
break;
/* Addressing modes */
@@ -7582,7 +7582,7 @@
mapping_state (MAP_THUMB);
inst.instruction = opcode->tvalue;
- if (!parse_operands (p, opcode->operands))
+ if (!parse_operands (p, (const char *)opcode->operands))
opcode->tencode ();
if (!inst.error)
@@ -7617,7 +7617,7 @@
else
inst.instruction |= inst.cond << 28;
inst.size = INSN_SIZE;
- if (!parse_operands (p, opcode->operands))
+ if (!parse_operands (p, (const char *)opcode->operands))
opcode->aencode ();
}
output_inst (str);