diff options
Diffstat (limited to 'contrib/binutils')
-rw-r--r-- | contrib/binutils/bfd/coffcode.h | 2 | ||||
-rw-r--r-- | contrib/binutils/bfd/opncls.c | 2 | ||||
-rw-r--r-- | contrib/binutils/bfd/peicode.h | 2 | ||||
-rw-r--r-- | contrib/binutils/gas/config/obj-elf.c | 2 | ||||
-rw-r--r-- | contrib/binutils/gas/frags.c | 2 | ||||
-rw-r--r-- | contrib/binutils/gas/subsegs.c | 4 | ||||
-rw-r--r-- | contrib/binutils/ld/ldexp.c | 6 | ||||
-rw-r--r-- | contrib/binutils/ld/sysdep.h | 3 | ||||
-rw-r--r-- | contrib/binutils/opcodes/i386-dis.c | 24 |
9 files changed, 25 insertions, 22 deletions
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h index a2aac5f..e654148 100644 --- a/contrib/binutils/bfd/coffcode.h +++ b/contrib/binutils/bfd/coffcode.h @@ -3240,7 +3240,7 @@ coff_compute_section_file_positions (bfd * abfd) incremented in coff_set_section_contents. This is right for SVR3.2. */ if (strcmp (current->name, _LIB) == 0) - bfd_set_section_vma (abfd, current, 0); + (void) bfd_set_section_vma (abfd, current, 0); #endif previous = current; diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c index 9e0cc26..ad22db5 100644 --- a/contrib/binutils/bfd/opncls.c +++ b/contrib/binutils/bfd/opncls.c @@ -231,7 +231,7 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd) then it may have been opened with special flags that make it unsafe to close and reopen the file. */ if (fd == -1) - bfd_set_cacheable (nbfd, TRUE); + (void) bfd_set_cacheable (nbfd, TRUE); return nbfd; } diff --git a/contrib/binutils/bfd/peicode.h b/contrib/binutils/bfd/peicode.h index 0f4858f..4ae10db 100644 --- a/contrib/binutils/bfd/peicode.h +++ b/contrib/binutils/bfd/peicode.h @@ -607,7 +607,7 @@ pe_ILF_make_a_section (pe_ILF_vars * vars, bfd_set_section_flags (vars->abfd, sec, flags | extra_flags); - bfd_set_section_alignment (vars->abfd, sec, 2); + (void) bfd_set_section_alignment (vars->abfd, sec, 2); /* Check that we will not run out of space. */ BFD_ASSERT (vars->data + size < vars->bim->buffer + vars->bim->size); diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c index 2f93990..12ca242 100644 --- a/contrib/binutils/gas/config/obj-elf.c +++ b/contrib/binutils/gas/config/obj-elf.c @@ -1636,7 +1636,7 @@ obj_elf_init_stab_section (segT seg) /* Force the section to align to a longword boundary. Without this, UnixWare ar crashes. */ - bfd_set_section_alignment (stdoutput, seg, 2); + (void) bfd_set_section_alignment (stdoutput, seg, 2); /* Make space for this first symbol. */ p = frag_more (12); diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c index adb9b19..98ac536 100644 --- a/contrib/binutils/gas/frags.c +++ b/contrib/binutils/gas/frags.c @@ -146,7 +146,7 @@ frag_new (int old_frags_var_max_size /* This will align the obstack so the next struct we allocate on it will begin at a correct boundary. */ - obstack_finish (&frchain_now->frch_obstack); + (void) obstack_finish (&frchain_now->frch_obstack); frchP = frchain_now; know (frchP); former_last_fragP = frchP->frch_last; diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c index 0094764..066a2fd 100644 --- a/contrib/binutils/gas/subsegs.c +++ b/contrib/binutils/gas/subsegs.c @@ -67,7 +67,7 @@ subseg_change (register segT seg, register int subseg) { seginfo = xcalloc (1, sizeof (*seginfo)); seginfo->bfd_section = seg; - bfd_set_section_userdata (stdoutput, seg, seginfo); + (void) bfd_set_section_userdata (stdoutput, seg, seginfo); } } @@ -169,7 +169,7 @@ subseg_get (const char *segname, int force_new) secptr->output_section = secptr; seginfo = xcalloc (1, sizeof (*seginfo)); seginfo->bfd_section = secptr; - bfd_set_section_userdata (stdoutput, secptr, seginfo); + (void) bfd_set_section_userdata (stdoutput, secptr, seginfo); } return secptr; } diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c index 4f1d61d..809b958 100644 --- a/contrib/binutils/ld/ldexp.c +++ b/contrib/binutils/ld/ldexp.c @@ -1112,9 +1112,9 @@ exp_get_fill (etree_type *tree, fill_type *def, char *name) fill = xmalloc (4 + sizeof (*fill) - 1); val = expld.result.value; fill->data[0] = (val >> 24) & 0xff; - fill->data[1] = (val >> 16) & 0xff; - fill->data[2] = (val >> 8) & 0xff; - fill->data[3] = (val >> 0) & 0xff; + __PAST_END(fill->data, 1) = (val >> 16) & 0xff; + __PAST_END(fill->data, 2) = (val >> 8) & 0xff; + __PAST_END(fill->data, 3) = (val >> 0) & 0xff; fill->size = 4; } return fill; diff --git a/contrib/binutils/ld/sysdep.h b/contrib/binutils/ld/sysdep.h index 4c5e994..2ee2047 100644 --- a/contrib/binutils/ld/sysdep.h +++ b/contrib/binutils/ld/sysdep.h @@ -54,6 +54,9 @@ extern char *strrchr (); /* for MAXPATHLEN */ #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> +#ifndef __PAST_END +# define __PAST_END(array, offset) (((typeof(*(array)) *)(array))[offset]) +#endif #endif #ifdef PATH_MAX # define LD_PATHMAX PATH_MAX diff --git a/contrib/binutils/opcodes/i386-dis.c b/contrib/binutils/opcodes/i386-dis.c index e84d314..10de45b 100644 --- a/contrib/binutils/opcodes/i386-dis.c +++ b/contrib/binutils/opcodes/i386-dis.c @@ -3203,7 +3203,7 @@ ckprefix (void) rex_used = 0; while (1) { - FETCH_DATA (the_info, codep + 1); + (void) FETCH_DATA (the_info, codep + 1); newrex = 0; switch (*codep) { @@ -3606,7 +3606,7 @@ print_insn (bfd_vma pc, disassemble_info *info) insn_codep = codep; sizeflag = priv.orig_sizeflag; - FETCH_DATA (info, codep + 1); + (void) FETCH_DATA (info, codep + 1); two_source_ops = (*codep == 0x62) || (*codep == 0xc8); if (((prefixes & PREFIX_FWAIT) @@ -3628,7 +3628,7 @@ print_insn (bfd_vma pc, disassemble_info *info) if (*codep == 0x0f) { unsigned char threebyte; - FETCH_DATA (info, codep + 2); + (void) FETCH_DATA (info, codep + 2); threebyte = *++codep; dp = &dis386_twobyte[threebyte]; need_modrm = twobyte_has_modrm[*codep]; @@ -3639,7 +3639,7 @@ print_insn (bfd_vma pc, disassemble_info *info) codep++; if (dp->name == NULL && dp->op[0].bytemode == IS_3BYTE_OPCODE) { - FETCH_DATA (info, codep + 2); + (void) FETCH_DATA (info, codep + 2); op = *codep++; switch (threebyte) { @@ -3724,7 +3724,7 @@ print_insn (bfd_vma pc, disassemble_info *info) } else if (need_modrm) { - FETCH_DATA (info, codep + 1); + (void) FETCH_DATA (info, codep + 1); modrm.mod = (*codep >> 6) & 3; modrm.reg = (*codep >> 3) & 7; modrm.rm = *codep & 7; @@ -4890,7 +4890,7 @@ OP_E (int bytemode, int sizeflag) if (base == 4) { havesib = 1; - FETCH_DATA (the_info, codep + 1); + (void) FETCH_DATA (the_info, codep + 1); index = (*codep >> 3) & 7; if (address_mode == mode_64bit || index != 0x4) /* When INDEX == 0x4 in 32 bit mode, SCALE is ignored. */ @@ -5147,7 +5147,7 @@ get64 (void) unsigned int a; unsigned int b; - FETCH_DATA (the_info, codep + 8); + (void) FETCH_DATA (the_info, codep + 8); a = *codep++ & 0xff; a |= (*codep++ & 0xff) << 8; a |= (*codep++ & 0xff) << 16; @@ -5169,7 +5169,7 @@ get32 (void) { bfd_signed_vma x = 0; - FETCH_DATA (the_info, codep + 4); + (void) FETCH_DATA (the_info, codep + 4); x = *codep++ & (bfd_signed_vma) 0xff; x |= (*codep++ & (bfd_signed_vma) 0xff) << 8; x |= (*codep++ & (bfd_signed_vma) 0xff) << 16; @@ -5182,7 +5182,7 @@ get32s (void) { bfd_signed_vma x = 0; - FETCH_DATA (the_info, codep + 4); + (void) FETCH_DATA (the_info, codep + 4); x = *codep++ & (bfd_signed_vma) 0xff; x |= (*codep++ & (bfd_signed_vma) 0xff) << 8; x |= (*codep++ & (bfd_signed_vma) 0xff) << 16; @@ -5198,7 +5198,7 @@ get16 (void) { int x = 0; - FETCH_DATA (the_info, codep + 2); + (void) FETCH_DATA (the_info, codep + 2); x = *codep++ & 0xff; x |= (*codep++ & 0xff) << 8; return x; @@ -6018,7 +6018,7 @@ OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { const char *mnemonic; - FETCH_DATA (the_info, codep + 1); + (void) FETCH_DATA (the_info, codep + 1); /* AMD 3DNow! instructions are specified by an opcode suffix in the place where an 8-bit immediate would normally go. ie. the last byte of the instruction. */ @@ -6054,7 +6054,7 @@ OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { unsigned int cmp_type; - FETCH_DATA (the_info, codep + 1); + (void) FETCH_DATA (the_info, codep + 1); obufp = obuf + strlen (obuf); cmp_type = *codep++ & 0xff; if (cmp_type < 8) |