diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-07-28 03:33:32 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-07-28 03:33:32 +0000 |
commit | 0aa529cb6b6141b8c231c99b2692d1bdc628a775 (patch) | |
tree | b33e2fa6c5337d2db691125b7b2715dea1a80490 | |
parent | 9e449d3e54f7810b6df544cb9fc8277327716834 (diff) | |
download | ppe42-binutils-0aa529cb6b6141b8c231c99b2692d1bdc628a775.tar.gz ppe42-binutils-0aa529cb6b6141b8c231c99b2692d1bdc628a775.zip |
Fix GCC warnings.
Abort if code falls off end of md_estimate_size_before_relax().
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-mn10300.c | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 760622ef22..f7d1e2abed 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +Thu Jul 27 11:25:01 2000 Andrew Cagney <cagney@b1.cygnus.com> + + * config/tc-mn10300.c (md_convert_frag): Fix printfs. + (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to + sym_ptr_ptr + (md_estimate_size_before_relax): Don't fall off end of function. + 2000-07-27 Kazu Hirata <kazu@hxi.com> * config/tc-avr.c: Fix formatting. diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index b701634b55..cc305912b6 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -659,7 +659,7 @@ md_convert_frag (abfd, sec, fragP) fragP->fr_literal[offset] = opcode; /* Create a fixup for the reversed conditional branch. */ - sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++); + sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++); fix_new (fragP, fragP->fr_fix + 1, 1, symbol_new (buf, sec, 0, fragP->fr_next), fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL); @@ -716,7 +716,7 @@ md_convert_frag (abfd, sec, fragP) fragP->fr_literal[offset] = opcode; /* Create a fixup for the reversed conditional branch. */ - sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++); + sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++); fix_new (fragP, fragP->fr_fix + 1, 1, symbol_new (buf, sec, 0, fragP->fr_next), fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL); @@ -762,7 +762,7 @@ md_convert_frag (abfd, sec, fragP) fragP->fr_literal[offset + 1] = opcode; /* Create a fixup for the reversed conditional branch. */ - sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++); + sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++); fix_new (fragP, fragP->fr_fix + 2, 1, symbol_new (buf, sec, 0, fragP->fr_next), fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL); @@ -798,7 +798,7 @@ md_convert_frag (abfd, sec, fragP) fragP->fr_literal[offset + 1] = opcode; /* Create a fixup for the reversed conditional branch. */ - sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++); + sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++); fix_new (fragP, fragP->fr_fix + 2, 1, symbol_new (buf, sec, 0, fragP->fr_next), fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL); @@ -1841,7 +1841,7 @@ tc_gen_reloc (seg, fixp) return NULL; } - reloc->sym_ptr_ptr = &bfd_abs_symbol; + reloc->sym_ptr_ptr = (asymbol **) &bfd_abs_symbol; reloc->addend = (S_GET_VALUE (fixp->fx_addsy) - S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset); } @@ -1896,6 +1896,7 @@ md_estimate_size_before_relax (fragp, seg) else return 2; } + abort (); } long |