Warning fixes:

* Makefile.in (flow.o): Depend on recog.h.
        * cpplib.h (directive_table): Add missing initializiers.
        (finclude): Change type of variable `bsize' to size_t.
        * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
        * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
        * fix-header.c (lookup_std_proto): Cast the result of `strlen' to
        `int' when comparing against one.
        (cpp_file_line_for_message): Mark parameter `pfile' with
        ATTRIBUTE_UNUSED.
        (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
        * flow.c: Include recog.h.
        (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
        * function.c (thread_prologue_and_epilogue_insns): Mark parameter
        `f' with ATTRIBUTE_UNUSED.
        (reposition_prologue_and_epilogue_notes): Likewise.
        * genopinit.c (gen_insn): Cast argument of ctype functions to
        `unsigned char'.
        * haifa-sched.c: Include recog.h.
        (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
        comparing against one.
        * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
        * mips-tfile.c (parse_end): Cast the argument of ctype function to
        `unsigned char'.
        (parse_ent): Likewise.
        (parse_input): Likewise.
        * optabs.c (init_libfuncs): Likewise.
        * protoize.c (find_rightmost_formals_list): Likewise.
        * recog.h (const_double_operand): Fix typo in prototype.
        * tlink.c (scan_linker_output): Cast the argument of ctype
        function to `unsigned char'.
        * toplev.c (check_lang_option): Cast the result of `strlen' to
        `int' when comparing against one.

From-SVN: r23155
This commit is contained in:
Kaveh R. Ghazi 1998-10-17 20:26:29 +00:00 committed by Kaveh Ghazi
parent eb51666662
commit 79c9824ecb
17 changed files with 88 additions and 34 deletions

View File

@ -1,3 +1,53 @@
Sat Oct 17 23:18:08 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (flow.o): Depend on recog.h.
* cpplib.h (directive_table): Add missing initializiers.
(finclude): Change type of variable `bsize' to size_t.
* cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED.
* dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE.
* fix-header.c (lookup_std_proto): Cast the result of `strlen' to
`int' when comparing against one.
(cpp_file_line_for_message): Mark parameter `pfile' with
ATTRIBUTE_UNUSED.
(cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
* flow.c: Include recog.h.
(sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR).
* function.c (thread_prologue_and_epilogue_insns): Mark parameter
`f' with ATTRIBUTE_UNUSED.
(reposition_prologue_and_epilogue_notes): Likewise.
* genopinit.c (gen_insn): Cast argument of ctype functions to
`unsigned char'.
* haifa-sched.c: Include recog.h.
(blockage_range): Cast result of UNIT_BLOCKED macro to (int) when
comparing against one.
* libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now.
* mips-tfile.c (parse_end): Cast the argument of ctype function to
`unsigned char'.
(parse_ent): Likewise.
(parse_input): Likewise.
* optabs.c (init_libfuncs): Likewise.
* protoize.c (find_rightmost_formals_list): Likewise.
* recog.h (const_double_operand): Fix typo in prototype.
* tlink.c (scan_linker_output): Cast the argument of ctype
function to `unsigned char'.
* toplev.c (check_lang_option): Cast the result of `strlen' to
`int' when comparing against one.
Sat Oct 17 13:09:09 1998 Graham <grahams@rcp.co.uk>
* gcse.c (dump_cuid_table): Correct typo.

View File

@ -1477,7 +1477,7 @@ loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \
insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h

View File

@ -377,7 +377,7 @@ static int do_warning PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHA
The initialize_builtins function assumes #define is the very first. */
static struct directive directive_table[] = {
{ 6, do_define, "define", T_DEFINE},
{ 6, do_define, "define", T_DEFINE, 0},
{ 5, do_xifdef, "ifdef", T_IFDEF, 1},
{ 6, do_xifdef, "ifndef", T_IFNDEF, 1},
{ 7, do_include, "include", T_INCLUDE, 1},
@ -387,18 +387,18 @@ static struct directive directive_table[] = {
{ 4, do_else, "else", T_ELSE, 1},
{ 2, do_if, "if", T_IF, 1},
{ 4, do_elif, "elif", T_ELIF, 1},
{ 5, do_undef, "undef", T_UNDEF},
{ 5, do_error, "error", T_ERROR},
{ 7, do_warning, "warning", T_WARNING},
{ 6, do_pragma, "pragma", T_PRAGMA},
{ 5, do_undef, "undef", T_UNDEF, 0},
{ 5, do_error, "error", T_ERROR, 0},
{ 7, do_warning, "warning", T_WARNING, 0},
{ 6, do_pragma, "pragma", T_PRAGMA, 0},
{ 4, do_line, "line", T_LINE, 1},
{ 5, do_ident, "ident", T_IDENT, 1},
#ifdef SCCS_DIRECTIVE
{ 4, do_sccs, "sccs", T_SCCS},
{ 4, do_sccs, "sccs", T_SCCS, 0},
#endif
{ 6, do_assert, "assert", T_ASSERT, 1},
{ 8, do_unassert, "unassert", T_UNASSERT, 1},
{ -1, 0, "", T_UNUSED},
{ -1, 0, "", T_UNUSED, 0},
};
/* table to tell if char can be part of a C identifier. */
@ -5642,7 +5642,7 @@ finclude (pfile, f, fname, system_header_p, dirptr)
First read the entire file into heap and
copy them into buffer on stack. */
int bsize = 2000;
size_t bsize = 2000;
st_size = 0;
fp->buf = (U_CHAR *) xmalloc (bsize + 2);

View File

@ -702,7 +702,7 @@ notreg_cost (x)
int
rtx_cost (x, outer_code)
rtx x;
enum rtx_code outer_code;
enum rtx_code outer_code ATTRIBUTE_UNUSED;
{
register int i, j;
register enum rtx_code code;

View File

@ -35,6 +35,8 @@ extern void dwarfout_end_epilogue PROTO ((void));
extern void dwarfout_begin_block PROTO ((unsigned));
extern void dwarfout_end_block PROTO ((unsigned));
#ifdef RTX_CODE
extern void dwarfout_label PROTO ((rtx));
#endif
extern void dwarfout_line PROTO ((char *, unsigned));

View File

@ -397,7 +397,7 @@ lookup_std_proto (name, name_length)
if (hash_tab[i] == 0)
return NULL;
fn = &std_protos[hash_tab[i]];
if (strlen (fn->fname) == name_length
if ((int) strlen (fn->fname) == name_length
&& strncmp (fn->fname, name, name_length) == 0)
return fn;
i = (i+1) % HASH_SIZE;
@ -1326,7 +1326,7 @@ main (argc, argv)
void
cpp_file_line_for_message (pfile, filename, line, column)
cpp_reader * pfile;
cpp_reader * pfile ATTRIBUTE_UNUSED;
char *filename;
int line, column;
{
@ -1418,7 +1418,7 @@ fatal VPROTO ((const char *str, ...))
}
void
cpp_fatal VPROTO ((cpp_reader * pfile, const char *str, ...))
cpp_fatal VPROTO ((cpp_reader * pfile ATTRIBUTE_UNUSED, const char *str, ...))
{
#ifndef __STDC__
cpp_reader * pfile;

View File

@ -122,6 +122,7 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "except.h"
#include "toplev.h"
#include "recog.h"
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
@ -3687,7 +3688,7 @@ void
sbitmap_copy (dst, src)
sbitmap dst, src;
{
bcopy (src->elms, dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
bcopy ((PTR) src->elms, (PTR) dst->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
}
/* Zero all elements in a bitmap. */

View File

@ -6183,7 +6183,7 @@ contains (insn, vec)
void
thread_prologue_and_epilogue_insns (f)
rtx f;
rtx f ATTRIBUTE_UNUSED;
{
#ifdef HAVE_prologue
if (HAVE_prologue)
@ -6284,7 +6284,7 @@ thread_prologue_and_epilogue_insns (f)
void
reposition_prologue_and_epilogue_notes (f)
rtx f;
rtx f ATTRIBUTE_UNUSED;
{
#if defined (HAVE_prologue) || defined (HAVE_epilogue)
/* Reposition the prologue and epilogue notes. */

View File

@ -202,7 +202,7 @@ gen_insn (insn)
for (i = ((int) MAX_MACHINE_MODE) - 1; i >= 0; i--)
{
for (p = mode_name[i], q = np; *p; p++, q++)
if (tolower (*p) != *q)
if (tolower ((unsigned char)*p) != *q)
break;
if (*p == 0
@ -256,11 +256,11 @@ gen_insn (insn)
break;
case 'a':
for (np = mode_name[m1]; *np; np++)
printf ("%c", tolower (*np));
printf ("%c", tolower ((unsigned char)*np));
break;
case 'b':
for (np = mode_name[m2]; *np; np++)
printf ("%c", tolower (*np));
printf ("%c", tolower ((unsigned char)*np));
break;
case 'A':
printf ("%smode", mode_name[m1]);
@ -273,7 +273,7 @@ gen_insn (insn)
break;
case 'C':
for (np = rtx_name[op]; *np; np++)
printf ("%c", toupper (*np));
printf ("%c", toupper ((unsigned char)*np));
break;
}
}

View File

@ -166,6 +166,7 @@
#include "insn-attr.h"
#include "except.h"
#include "toplev.h"
#include "recog.h"
extern char *reg_known_equiv_p;
extern rtx *reg_known_value;
@ -2858,7 +2859,7 @@ blockage_range (unit, insn)
unsigned int blockage = INSN_BLOCKAGE (insn);
unsigned int range;
if (UNIT_BLOCKED (blockage) != unit + 1)
if ((int) UNIT_BLOCKED (blockage) != unit + 1)
{
range = function_units[unit].blockage_range_function (insn);
/* We only cache the blockage range for one unit and then only if

View File

@ -3637,7 +3637,7 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata)
If we find one, then we unwind the frames down to the one that
has the handler and transfer control into the handler. */
extern void __throw(void) __attribute__ ((__noreturn__));
/*extern void __throw(void) __attribute__ ((__noreturn__));*/
void
__throw ()

View File

@ -3472,7 +3472,7 @@ parse_end (start)
}
/* Get the function name, skipping whitespace. */
for (start_func = start; ISSPACE (*start_func); start_func++)
for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
;
ch = *start_func;
@ -3531,7 +3531,7 @@ parse_ent (start)
return;
}
for (start_func = start; ISSPACE (*start_func); start_func++)
for (start_func = start; ISSPACE ((unsigned char)*start_func); start_func++)
;
ch = *start_func;
@ -3871,16 +3871,16 @@ parse_input __proto((void))
while ((p = read_line ()) != (char *) 0)
{
/* Skip leading blanks */
while (ISSPACE (*p))
while (ISSPACE ((unsigned char)*p))
p++;
/* See if it's a directive we handle. If so, dispatch handler. */
for (i = 0; i < sizeof (pseudo_ops) / sizeof (pseudo_ops[0]); i++)
if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0
&& ISSPACE (p[pseudo_ops[i].len]))
&& ISSPACE ((unsigned char)(p[pseudo_ops[i].len])))
{
p += pseudo_ops[i].len; /* skip to first argument */
while (ISSPACE (*p))
while (ISSPACE ((unsigned char)*p))
p++;
(*pseudo_ops[i].func)( p );

View File

@ -4034,7 +4034,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
for (q = opname; *q; )
*p++ = *q++;
for (q = mname; *q; q++)
*p++ = tolower (*q);
*p++ = tolower ((unsigned char)*q);
*p++ = suffix;
*p++ = '\0';
optable->handlers[(int) mode].libfunc

View File

@ -3447,8 +3447,8 @@ find_rightmost_formals_list (clean_text_p)
while (*end_formals != ')')
{
if (ISSPACE (*end_formals))
while (ISSPACE (*end_formals))
if (ISSPACE ((unsigned char)*end_formals))
while (ISSPACE ((unsigned char)*end_formals))
check_source (--end_formals > clean_read_ptr, 0);
else
check_source (--end_formals > clean_read_ptr, 0);

View File

@ -44,7 +44,7 @@ extern int register_operand PROTO((rtx, enum machine_mode));
extern int scratch_operand PROTO((rtx, enum machine_mode));
extern int immediate_operand PROTO((rtx, enum machine_mode));
extern int const_int_operand PROTO((rtx, enum machine_mode));
extern int cosnt_double_operand PROTO((rtx, enum machine_mode));
extern int const_double_operand PROTO((rtx, enum machine_mode));
extern int nonimmediate_operand PROTO((rtx, enum machine_mode));
extern int nonmemory_operand PROTO((rtx, enum machine_mode));
extern int push_operand PROTO((rtx, enum machine_mode));

View File

@ -530,13 +530,13 @@ scan_linker_output (fname)
symbol *sym;
int end;
while (*p && ISSPACE (*p))
while (*p && ISSPACE ((unsigned char)*p))
++p;
if (! *p)
continue;
for (q = p; *q && ! ISSPACE (*q); ++q)
for (q = p; *q && ! ISSPACE ((unsigned char)*q); ++q)
;
/* Try the first word on the line. */

View File

@ -4179,7 +4179,7 @@ check_lang_option (option, lang_option)
-fpack-struct. */
/* An exact match is OK */
if (strlen (option) == len)
if ((int) strlen (option) == len)
return 1;
/* If it is not an -f or -W option allow the match */