This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch, commited]: Fix compile time warning in tc-spu.c
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Sun, 29 Oct 2006 18:18:03 +0000
- Subject: [Patch, commited]: Fix compile time warning in tc-spu.c
Hi Guys,
I am apply the small patch below to fix a compile time warning in
tc-spu.c. On a 64-bit host the difference between two pointers is a
long not an int, and this was triggering a warning about this value
being used as a maximum string length parameter in a printf style
statement.
Cheers
Nick
gas/ChangeLog
2006-10-29 Nick Clifton <nickc@redhat.com>
* config/tc-spu.c (md_assemble): Cast printf string size parameter
to int in order to avoid a compiler warning.
Index: gas/config/tc-spu.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-spu.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tc-spu.c
*** gas/config/tc-spu.c 25 Oct 2006 06:49:21 -0000 1.1
--- gas/config/tc-spu.c 29 Oct 2006 18:14:55 -0000
*************** md_assemble (char *op)
*** 333,339 ****
const char *d = syntax_error_param;
while (*d != '$')
d--;
! as_warn (_("Treating '%-*s' as a symbol."), syntax_error_param - d, d);
}
/* grow the current frag and plop in the opcode */
--- 333,339 ----
const char *d = syntax_error_param;
while (*d != '$')
d--;
! as_warn (_("Treating '%-*s' as a symbol."), (int)(syntax_error_param - d), d);
}
/* grow the current frag and plop in the opcode */