aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
committerAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
commit0af1713e7cd57b52f6c81f73aa58934132198880 (patch)
treeaf4b52a6c5f3c8cd570e4f266f019cf552d6f442 /gas
parent22ad7fee2a313665df38ad7177f962f7c13ad0b6 (diff)
downloadgdb-0af1713e7cd57b52f6c81f73aa58934132198880.zip
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.gz
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.bz2
Silence gcc printf warnings
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/messages.c8
-rw-r--r--gas/symbols.c10
-rw-r--r--gas/write.c5
4 files changed, 16 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6196e16..e8a6ab5 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * messages.c, symbols.c, write.c: Silence gcc warnings.
+
2008-07-28 Ineiev <ineiev@yahoo.co.uk>
* config/tc-i386.c (operand_type_check): Warning fix.
diff --git a/gas/messages.c b/gas/messages.c
index bbe181b..69fcf78 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -1,6 +1,6 @@
/* messages.c - error reporter -
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2003, 2004, 2005, 2006, 2007
+ 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -500,9 +500,9 @@ as_internal_value_out_of_range (char * prefix,
if (sizeof (val) > sizeof (bfd_vma))
abort ();
- sprintf_vma (val_buf, val);
- sprintf_vma (min_buf, min);
- sprintf_vma (max_buf, max);
+ sprintf_vma (val_buf, (bfd_vma) val);
+ sprintf_vma (min_buf, (bfd_vma) min);
+ sprintf_vma (max_buf, (bfd_vma) max);
/* xgettext:c-format. */
err = _("%s out of range (0x%s is not between 0x%s and 0x%s)");
diff --git a/gas/symbols.c b/gas/symbols.c
index 252cfce..c7262b8 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1,6 +1,6 @@
/* symbols.c -symbol table-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2791,7 +2791,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (s != undefined_section
&& s != expr_section)
- fprintf (file, " %lx", (long) S_GET_VALUE (sym));
+ fprintf (file, " %lx", (unsigned long) S_GET_VALUE (sym));
}
else if (indent_level < max_indent_level
&& S_GET_SEGMENT (sym) != undefined_section)
@@ -2800,7 +2800,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
fprintf (file, "\n%*s<", indent_level * 4, "");
if (LOCAL_SYMBOL_CHECK (sym))
fprintf (file, "constant %lx",
- (long) ((struct local_symbol *) sym)->lsy_value);
+ (unsigned long) ((struct local_symbol *) sym)->lsy_value);
else
print_expr_1 (file, &sym->sy_value);
fprintf (file, ">");
@@ -2844,7 +2844,7 @@ print_expr_1 (FILE *file, expressionS *exp)
fprintf (file, "absent");
break;
case O_constant:
- fprintf (file, "constant %lx", (long) exp->X_add_number);
+ fprintf (file, "constant %lx", (unsigned long) exp->X_add_number);
break;
case O_symbol:
indent_level++;
@@ -2854,7 +2854,7 @@ print_expr_1 (FILE *file, expressionS *exp)
maybe_print_addnum:
if (exp->X_add_number)
fprintf (file, "\n%*s%lx", indent_level * 4, "",
- (long) exp->X_add_number);
+ (unsigned long) exp->X_add_number);
indent_level--;
break;
case O_register:
diff --git a/gas/write.c b/gas/write.c
index 2ba44b9..660df81 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1,6 +1,6 @@
/* write.c - emit .o file
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2516,7 +2516,8 @@ print_fixup (fixS *fixp)
fprintf_vma (stderr, (bfd_vma) ((bfd_hostptr_t) fixp->fx_frag));
fprintf (stderr, " where=%ld offset=%lx addnumber=%lx",
(long) fixp->fx_where,
- (long) fixp->fx_offset, (long) fixp->fx_addnumber);
+ (unsigned long) fixp->fx_offset,
+ (unsigned long) fixp->fx_addnumber);
fprintf (stderr, "\n %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
fixp->fx_r_type);
if (fixp->fx_addsy)