aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-07-11 20:02:30 +0000
committerIan Lance Taylor <ian@airs.com>1999-07-11 20:02:30 +0000
commitb4c96d0d372cd69f536cb481d0c9554cf9f0eda8 (patch)
treef1493951e1d44b983758309afb226a00bb058edc /binutils/objcopy.c
parent7442e600c8d771f2d03c6df7415bbfcbf99759b6 (diff)
downloadgdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.zip
gdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.tar.gz
gdb-b4c96d0d372cd69f536cb481d0c9554cf9f0eda8.tar.bz2
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate. Add variable initializations. Add casts. * objdump.c (disassemble_bytes): Change j to bfd_vma. * readelf.c (process_syminfo): Change i to unsigned int. (display_debug_info): Change abbrev_number to unsigned long. (process_mips_specific): Change fcnt to size_t.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 53bd996..6137f11 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -467,7 +467,7 @@ is_specified_symbol (name, list)
static boolean
is_strip_section (abfd, sec)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
{
struct section_list *p;
@@ -605,7 +605,7 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave)
*to++ = *from;
- if (*size % interleave > copy_byte)
+ if (*size % interleave > (bfd_size_type) copy_byte)
*size = (*size / interleave) + 1;
else
*size /= interleave;
@@ -1360,7 +1360,7 @@ copy_section (ibfd, isection, obfdarg)
static void
get_sections (obfd, osection, secppparg)
- bfd *obfd;
+ bfd *obfd ATTRIBUTE_UNUSED;
asection *osection;
PTR secppparg;
{
@@ -1467,8 +1467,8 @@ static boolean
write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd;
PTR dhandle;
- long *symcountp;
- asymbol ***symppp;
+ long *symcountp ATTRIBUTE_UNUSED;
+ asymbol ***symppp ATTRIBUTE_UNUSED;
{
if (bfd_get_flavour (obfd) == bfd_target_ieee_flavour)
return write_ieee_debugging_info (obfd, dhandle);
@@ -1807,15 +1807,21 @@ copy_main (argc, argv)
const char *s;
int len;
char *name;
- char *option;
+ char *option = NULL;
bfd_vma val;
- enum change_action what;
+ enum change_action what = CHANGE_IGNORE;
switch (c)
{
- case OPTION_CHANGE_SECTION_ADDRESS: option = "--change-section-address"; break;
- case OPTION_CHANGE_SECTION_LMA: option = "--change-section-lma"; break;
- case OPTION_CHANGE_SECTION_VMA: option = "--change-section-vma"; break;
+ case OPTION_CHANGE_SECTION_ADDRESS:
+ option = "--change-section-address";
+ break;
+ case OPTION_CHANGE_SECTION_LMA:
+ option = "--change-section-lma";
+ break;
+ case OPTION_CHANGE_SECTION_VMA:
+ option = "--change-section-vma";
+ break;
}
s = strchr (optarg, '=');