mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
gcc lint.
* as.c (main): Move a inside the #if 0 block which uses it. * ecoff.c (current_stabs_filename): Make const. * frags.h (frag_align_pattern): Declare. * gasp.c (new_file): Cast isp to long, and use %ld to print it. * config/tc-alpha.h (md_operand): Add cast to void. (alpha_do_align): Declare argument types. (tc_get_register): Declare. (alpha_frob_ecoff_data): Declare. * config/tc-alpha.c: Include <ctype.h>. (s_mask): Don't declare; does not exist. (line_comment_chars): Remove /* from descriptive comment. (tc_get_register): Remove unused local reg. (tc_gen_reloc): Don't bother to compare unsigned to zero. (s_base): Correct warning to actually print register number. (md_begin): Remove unused locals retval, lose, and i. (alpha_fix_adjustable): Move default case inside switch to avoid warning. (load_symbol_address): Remove unused locals reloc_addr, p, sym, and addend. (emit_byte_manip_r): Declare types for all arguments. (emit_extract_r, emit_insert_r, emit_mask_r): Likewise. (emit_sign_extend, emit_bis_r, s_proc): Likewise. (alpha_ip): Use sprint_value to print offsetT value. Remove unused local size. Remove unused label get_macro. (alpha_do_align): Make fill const. (md_apply_fix): Remove unused label check_zov.
This commit is contained in:
25
gas/ecoff.c
25
gas/ecoff.c
@@ -1402,6 +1402,7 @@ static int debug = 0; /* trace functions */
|
||||
static int stabs_seen = 0; /* != 0 if stabs have been seen */
|
||||
|
||||
static int current_file_idx;
|
||||
static const char *current_stabs_filename;
|
||||
|
||||
/* Pseudo symbol to use when putting stabs into the symbol table. */
|
||||
#ifndef STABS_SYMBOL
|
||||
@@ -2200,6 +2201,8 @@ add_file (file_name, indx)
|
||||
listing_source_file (file_name);
|
||||
#endif
|
||||
|
||||
current_stabs_filename = file_name;
|
||||
|
||||
/* If we're creating stabs, then we don't actually make a new FDR.
|
||||
Instead, we just create a stabs symbol. */
|
||||
if (stabs_seen)
|
||||
@@ -2275,7 +2278,7 @@ add_file (file_name, indx)
|
||||
&cur_file_ptr->thash_head[0]);
|
||||
if (generate_asm_line_stab)
|
||||
{
|
||||
static char itstr[] = "int:t1=r1;-2147483648;2147483647;";
|
||||
static char itstr[] = "void:t1=1";
|
||||
mark_stabs (0);
|
||||
(void) add_ecoff_symbol (file_name, st_Nil, sc_Nil,
|
||||
symbol_new ("L0\001", now_seg,
|
||||
@@ -4097,13 +4100,11 @@ ecoff_build_procs (backend, buf, bufend, offset)
|
||||
void (* const swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR))
|
||||
= backend->swap_pdr_out;
|
||||
char *pdr_out;
|
||||
int first_fil;
|
||||
long iproc;
|
||||
vlinks_t *file_link;
|
||||
|
||||
pdr_out = *buf + offset;
|
||||
|
||||
first_fil = 1;
|
||||
iproc = 0;
|
||||
|
||||
/* The procedures are stored by file. */
|
||||
@@ -4153,10 +4154,11 @@ ecoff_build_procs (backend, buf, bufend, offset)
|
||||
S_GET_SEGMENT (adr_sym)));
|
||||
if (first)
|
||||
{
|
||||
if (first_fil)
|
||||
first_fil = 0;
|
||||
else
|
||||
fil_ptr->fdr.adr = adr;
|
||||
/* This code used to force the adr of the very
|
||||
first fdr to be 0. However, the native tools
|
||||
don't do that, and I can't remember why it
|
||||
used to work that way, so I took it out. */
|
||||
fil_ptr->fdr.adr = adr;
|
||||
first = 0;
|
||||
}
|
||||
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
|
||||
@@ -5116,11 +5118,18 @@ generate_ecoff_stab (what, string, type, other, desc)
|
||||
|
||||
static int line_label_cnt = 0;
|
||||
void
|
||||
ecoff_generate_asm_line_stab (lineno)
|
||||
ecoff_generate_asm_line_stab (filename, lineno)
|
||||
char *filename;
|
||||
int lineno;
|
||||
{
|
||||
char *ll;
|
||||
|
||||
if (strcmp (current_stabs_filename, filename))
|
||||
{
|
||||
add_file (filename, 0);
|
||||
generate_asm_line_stab = 1;
|
||||
}
|
||||
|
||||
line_label_cnt++;
|
||||
/* generate local label $LMnn */
|
||||
ll = xmalloc(10);
|
||||
|
||||
Reference in New Issue
Block a user