summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2005-07-07 19:27:52 +0000
committerJim Wilson <wilson@tuliptree.org>2005-07-07 19:27:52 +0000
commite0eda94b6e8fd26bf08c03e75a76caa933fe03d3 (patch)
tree31eecb1b0c94b39aa47cc1cf50a092595fb3c337 /gas
parent0c7418afe5d80a11835f8f32b84c3d61df814f90 (diff)
downloadbinutils-redhat-e0eda94b6e8fd26bf08c03e75a76caa933fe03d3.tar.gz
Kaveh Ghazi's printf format attribute checking patch.
bfd: * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix format bugs. * vms.h (_bfd_vms_debug): Add format attribute. (_bfd_vms_debug, _bfd_hexdump): Fix typos. binutils: * bucomm.h (report): Add format attribute. * dlltool.c (inform): Likewise. * dllwrap.c (display, inform, warn): Likewise. * objdump.c (objdump_sprintf): Likewise. * readelf.c (error, warn): Likewise. Fix format bugs. gas: * config/tc-tic30.c (debug): Add format attribute. Fix format bugs. include: * dis-asm.h (fprintf_ftype): Add format attribute. opcodes: * arc-dis.c, arm-dis.c, cris-dis.c, crx-dis.c, d10v-dis.c, d30v-dis.c, fr30-dis.c, h8300-dis.c, h8500-dis.c, i860-dis.c, ia64-dis.c, ip2k-dis.c, m10200-dis.c, m10300-dis.c, m88k-dis.c, mcore-dis.c, mips-dis.c, ms1-dis.c, or32-dis.c, ppc-dis.c, sh64-dis.c, sparc-dis.c, tic4x-dis.c, tic80-dis.c, v850-dis.c: Fix format bugs. * ia64-gen.c (fail, warn): Add format attribute. * or32-opc.c (debug): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-tic30.c24
2 files changed, 17 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index bc81e200d3..faaa63c245 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/tc-tic30.c (debug): Add format attribute. Fix format
+ bugs.
+
2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (cpu_arch): Add sse3.
diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c
index 514a995b34..b77a7b0fbd 100644
--- a/gas/config/tc-tic30.c
+++ b/gas/config/tc-tic30.c
@@ -86,7 +86,7 @@ const pseudo_typeS md_pseudo_table[] =
{0, 0, 0}
};
-static int
+static int ATTRIBUTE_PRINTF_1
debug (const char *string, ...)
{
if (flag_debug)
@@ -439,9 +439,9 @@ tic30_operand (char *token)
debug ("Expression type: %d\n",
current_op->direct.direct_expr.X_op);
- debug ("Expression addnum: %d\n",
- current_op->direct.direct_expr.X_add_number);
- debug ("Segment: %d\n", retval);
+ debug ("Expression addnum: %ld\n",
+ (long) current_op->direct.direct_expr.X_add_number);
+ debug ("Segment: %p\n", retval);
input_line_pointer = save_input_line_pointer;
@@ -609,9 +609,9 @@ tic30_operand (char *token)
retval = expression (&current_op->immediate.imm_expr);
debug ("Expression type: %d\n",
current_op->immediate.imm_expr.X_op);
- debug ("Expression addnum: %d\n",
- current_op->immediate.imm_expr.X_add_number);
- debug ("Segment: %d\n", retval);
+ debug ("Expression addnum: %ld\n",
+ (long) current_op->immediate.imm_expr.X_add_number);
+ debug ("Segment: %p\n", retval);
input_line_pointer = save_input_line_pointer;
if (current_op->immediate.imm_expr.X_op == O_constant)
@@ -1140,7 +1140,7 @@ md_apply_fix (fixS *fixP,
debug ("Values in fixP\n");
debug ("fx_size = %d\n", fixP->fx_size);
debug ("fx_pcrel = %d\n", fixP->fx_pcrel);
- debug ("fx_where = %d\n", fixP->fx_where);
+ debug ("fx_where = %ld\n", fixP->fx_where);
debug ("fx_offset = %d\n", (int) fixP->fx_offset);
{
char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
@@ -1182,11 +1182,11 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
valueT
md_section_align (segT segment, valueT size)
{
- debug ("In md_section_align() segment = %d and size = %d\n",
- segment, size);
+ debug ("In md_section_align() segment = %p and size = %lu\n",
+ segment, (unsigned long) size);
size = (size + 3) / 4;
size *= 4;
- debug ("New size value = %d\n", size);
+ debug ("New size value = %lu\n", (unsigned long) size);
return size;
}
@@ -1196,7 +1196,7 @@ md_pcrel_from (fixS *fixP)
int offset;
debug ("In md_pcrel_from()\n");
- debug ("fx_where = %d\n", fixP->fx_where);
+ debug ("fx_where = %ld\n", fixP->fx_where);
debug ("fx_size = %d\n", fixP->fx_size);
/* Find the opcode that represents the current instruction in the
fr_literal storage area, and check bit 21. Bit 21 contains whether the