This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: gas/sim/opcodes Warnings
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH]: gas/sim/opcodes Warnings
- From: Dave Brolley <brolley at redhat dot com>
- Date: Thu, 13 Jul 2000 17:30:44 -0400
- Organization: Red Hat Canada, Inc
Hi,
The attached patch gets rid of some warnings when building
gas/sim/opcodes. Most of them are unused parameters and integer
signedness. The only thing I'm not sure about is whether it's
permissable to use ATTRIBUTE_UNSIGNED in this code.
Seeking approval to commit this.
Dave
2000-07-13 Dave Brolley <brolley@redhat.com>
* cgen.c (queue_fixup): Declare opinfo.
(gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED.
(gas_cgen_md_operand): Ditto.
(gas_cgen_md_apply_fix3): Ditto.
2000-07-13 Dave Brolley <brolley@redhat.com>
* cgen.h (cgen_hw_lookup_by_num): Second parameter is unsigned.
2000-07-13 Dave Brolley <brolley@redhat.com>
* cgen-opc.c (cgen_hw_lookup_by_name): 'i' is now unsigned.
(cgen_hw_lookup_by_num): Ditto.
(cgen_operand_lookup_by_name): Ditto.
* cgen-dis.c (hash_insn_array): Mark unused parameters with
ATTRIBUTE_UNUSED.
* cgen-asm.c (hash_insn_array): Mark unused parameters with
ATTRIBUTE_UNUSED.
(cgen_parse_keyword): Ditto.
2000-07-13 Dave Brolley <brolley@redhat.com>
* cgen-par.h: (sim_queue_fn_di_write): Second parameter is now a generic
void function.
* cgen-par.c (sim_queue_fn_di_write): 'write_function' is now a generic
void function.
Index: gas/cgen.c
===================================================================
RCS file: /cvs/src/src/gas/cgen.c,v
retrieving revision 1.3
diff -c -p -r1.3 cgen.c
*** cgen.c 2000/06/24 15:10:45 1.3
--- cgen.c 2000/07/13 21:21:02
*************** gas_cgen_init_parse ()
*** 81,86 ****
--- 81,87 ----
static void
queue_fixup (opindex, opinfo, expP)
int opindex;
+ int opinfo;
expressionS * expP;
{
/* We need to generate a fixup for this expression. */
*************** static int expr_jmp_buf_p;
*** 247,253 ****
const char *
gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
! CGEN_CPU_DESC cd;
enum cgen_parse_operand_type want;
const char ** strP;
int opindex;
--- 248,254 ----
const char *
gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
! CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
enum cgen_parse_operand_type want;
const char ** strP;
int opindex;
*************** gas_cgen_parse_operand (cd, want, strP,
*** 330,336 ****
void
gas_cgen_md_operand (expressionP)
! expressionS * expressionP;
{
/* Don't longjmp if we're not called from within cgen_parse_operand(). */
if (expr_jmp_buf_p)
--- 331,337 ----
void
gas_cgen_md_operand (expressionP)
! expressionS * expressionP ATTRIBUTE_UNUSED;
{
/* Don't longjmp if we're not called from within cgen_parse_operand(). */
if (expr_jmp_buf_p)
*************** int
*** 494,500 ****
gas_cgen_md_apply_fix3 (fixP, valueP, seg)
fixS * fixP;
valueT * valueP;
! segT seg;
{
char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
valueT value;
--- 495,501 ----
gas_cgen_md_apply_fix3 (fixP, valueP, seg)
fixS * fixP;
valueT * valueP;
! segT seg ATTRIBUTE_UNUSED;
{
char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
valueT value;
*************** gas_cgen_md_apply_fix3 (fixP, valueP, se
*** 637,643 ****
arelent *
gas_cgen_tc_gen_reloc (section, fixP)
! asection * section;
fixS * fixP;
{
arelent * reloc;
--- 638,644 ----
arelent *
gas_cgen_tc_gen_reloc (section, fixP)
! asection * section ATTRIBUTE_UNUSED;
fixS * fixP;
{
arelent * reloc;
Index: include/opcode/cgen.h
===================================================================
RCS file: /cvs/src/src/include/opcode/cgen.h,v
retrieving revision 1.6
diff -c -p -r1.6 cgen.h
*** cgen.h 2000/06/19 01:22:42 1.6
--- cgen.h 2000/07/13 21:21:13
*************** typedef struct {
*** 452,458 ****
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
PARAMS ((CGEN_CPU_DESC, const char *));
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
! PARAMS ((CGEN_CPU_DESC, int));
/* This struct is used to describe things like register names, etc. */
--- 452,458 ----
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
PARAMS ((CGEN_CPU_DESC, const char *));
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
! PARAMS ((CGEN_CPU_DESC, unsigned int));
/* This struct is used to describe things like register names, etc. */
Index: opcodes/cgen-asm.c
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-asm.c,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 cgen-asm.c
*** cgen-asm.c 1999/05/03 07:28:59 1.1.1.1
--- cgen-asm.c 2000/07/13 21:21:21
*************** hash_insn_array (cd, insns, count, entsi
*** 66,72 ****
CGEN_CPU_DESC cd;
const CGEN_INSN *insns;
int count;
! int entsize;
CGEN_INSN_LIST **htable;
CGEN_INSN_LIST *hentbuf;
{
--- 66,72 ----
CGEN_CPU_DESC cd;
const CGEN_INSN *insns;
int count;
! int entsize ATTRIBUTE_UNUSED;
CGEN_INSN_LIST **htable;
CGEN_INSN_LIST *hentbuf;
{
*************** cgen_asm_lookup_insn (cd, insn)
*** 198,204 ****
const char *
cgen_parse_keyword (cd, strp, keyword_table, valuep)
! CGEN_CPU_DESC cd;
const char **strp;
CGEN_KEYWORD *keyword_table;
long *valuep;
--- 198,204 ----
const char *
cgen_parse_keyword (cd, strp, keyword_table, valuep)
! CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
const char **strp;
CGEN_KEYWORD *keyword_table;
long *valuep;
Index: opcodes/cgen-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-dis.c,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 cgen-dis.c
*** cgen-dis.c 1999/05/03 07:28:59 1.1.1.1
--- cgen-dis.c 2000/07/13 21:21:21
*************** hash_insn_array (cd, insns, count, entsi
*** 43,49 ****
CGEN_CPU_DESC cd;
const CGEN_INSN * insns;
int count;
! int entsize;
CGEN_INSN_LIST ** htable;
CGEN_INSN_LIST * hentbuf;
{
--- 43,49 ----
CGEN_CPU_DESC cd;
const CGEN_INSN * insns;
int count;
! int entsize ATTRIBUTE_UNUSED;
CGEN_INSN_LIST ** htable;
CGEN_INSN_LIST * hentbuf;
{
Index: opcodes/cgen-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-opc.c,v
retrieving revision 1.2
diff -c -p -r1.2 cgen-opc.c
*** cgen-opc.c 2000/02/24 23:58:52 1.2
--- cgen-opc.c 2000/07/13 21:21:21
*************** cgen_hw_lookup_by_name (cd, name)
*** 263,269 ****
CGEN_CPU_DESC cd;
const char *name;
{
! int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
for (i = 0; i < cd->hw_table.num_entries; ++i)
--- 263,269 ----
CGEN_CPU_DESC cd;
const char *name;
{
! unsigned int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
for (i = 0; i < cd->hw_table.num_entries; ++i)
*************** cgen_hw_lookup_by_name (cd, name)
*** 281,289 ****
const CGEN_HW_ENTRY *
cgen_hw_lookup_by_num (cd, hwnum)
CGEN_CPU_DESC cd;
! int hwnum;
{
! int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
/* ??? This can be speeded up. */
--- 281,289 ----
const CGEN_HW_ENTRY *
cgen_hw_lookup_by_num (cd, hwnum)
CGEN_CPU_DESC cd;
! unsigned int hwnum;
{
! unsigned int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
/* ??? This can be speeded up. */
*************** cgen_operand_lookup_by_name (cd, name)
*** 305,311 ****
CGEN_CPU_DESC cd;
const char *name;
{
! int i;
const CGEN_OPERAND **op = cd->operand_table.entries;
for (i = 0; i < cd->operand_table.num_entries; ++i)
--- 305,311 ----
CGEN_CPU_DESC cd;
const char *name;
{
! unsigned int i;
const CGEN_OPERAND **op = cd->operand_table.entries;
for (i = 0; i < cd->operand_table.num_entries; ++i)
Index: sim/common/cgen-par.c
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-par.c,v
retrieving revision 1.3
diff -c -p -r1.3 cgen-par.c
*** cgen-par.c 2000/04/05 22:31:29 1.3
--- cgen-par.c 2000/07/13 21:21:21
*************** void sim_queue_fn_si_write (
*** 107,113 ****
void sim_queue_fn_sf_write (
SIM_CPU *cpu,
! void (*write_function)(SIM_CPU *cpu, UINT, SF),
UINT regno,
SF value
)
--- 107,113 ----
void sim_queue_fn_sf_write (
SIM_CPU *cpu,
! void (*write_function)(),
UINT regno,
SF value
)
Index: sim/common/cgen-par.h
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-par.h,v
retrieving revision 1.3
diff -c -p -r1.3 cgen-par.h
*** cgen-par.h 2000/04/05 22:31:29 1.3
--- cgen-par.h 2000/07/13 21:21:21
*************** extern void sim_queue_pc_write (SIM_CPU
*** 189,195 ****
extern void sim_queue_fn_hi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, UHI), UINT, UHI);
extern void sim_queue_fn_si_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, USI), UINT, USI);
extern void sim_queue_fn_sf_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SF), UINT, SF);
! extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DI), UINT, DI);
extern void sim_queue_fn_df_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DF), UINT, DF);
extern void sim_queue_fn_xi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SI *), UINT, SI *);
extern void sim_queue_fn_pc_write (SIM_CPU *, void (*)(SIM_CPU *, USI), USI);
--- 189,195 ----
extern void sim_queue_fn_hi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, UHI), UINT, UHI);
extern void sim_queue_fn_si_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, USI), UINT, USI);
extern void sim_queue_fn_sf_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SF), UINT, SF);
! extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(), UINT, DI);
extern void sim_queue_fn_df_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DF), UINT, DF);
extern void sim_queue_fn_xi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SI *), UINT, SI *);
extern void sim_queue_fn_pc_write (SIM_CPU *, void (*)(SIM_CPU *, USI), USI);