mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 22:15:12 +08:00
Gag -Wuninitialized warnings.
Add -Wuninitialized to default warning list.
This commit is contained in:
@ -1,3 +1,22 @@
|
|||||||
|
2001-03-28 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* configure.in (build_warnings): Add -Wuninitialized.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
* v850-tdep.c (v850_scan_prologue): Initialize ``insn2''.
|
||||||
|
* sparc-tdep.c (sparc64_push_arguments): Add default case to
|
||||||
|
switch.
|
||||||
|
* sh-tdep.c (sh_do_fp_register): Replace ``?:'' printf format
|
||||||
|
expression with if statement.
|
||||||
|
* mn10200-tdep.c (mn10200_analyze_prologue): Initialize
|
||||||
|
``stack_size''.
|
||||||
|
* mips-tdep.c (show_mipsfpu_command): Add default case to switch.
|
||||||
|
(mips_dump_tdep): Fix setting of ef_mips_arch.
|
||||||
|
* mcore-tdep.c (mcore_analyze_prologue): Initialize ``fp_regnum''.
|
||||||
|
* dsrec.c (make_srec): Always initialize ``binbuf''.
|
||||||
|
* monitor.c (monitor_read_memory_single): Do not pass an
|
||||||
|
uninitialized buffer to monitor_error. Make ``i'' more local.
|
||||||
|
|
||||||
2001-03-28 Andrew Cagney <ac131313@redhat.com>
|
2001-03-28 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* MAINTAINERS: Change ns32k target to ,-Werror.
|
* MAINTAINERS: Change ns32k target to ,-Werror.
|
||||||
|
753
gdb/configure
vendored
753
gdb/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -652,10 +652,10 @@ fi
|
|||||||
# NOTE: If you add to this list, remember to update
|
# NOTE: If you add to this list, remember to update
|
||||||
# gdb/doc/gdbint.texinfo.
|
# gdb/doc/gdbint.texinfo.
|
||||||
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
|
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
|
||||||
-Wformat -Wparentheses -Wpointer-arith"
|
-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
|
||||||
# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
|
# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
|
||||||
# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
|
# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
|
||||||
# -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual
|
# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
|
||||||
# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
|
# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
|
||||||
# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
|
# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
|
||||||
# -Woverloaded-virtual -Winline -Werror"
|
# -Woverloaded-virtual -Winline -Werror"
|
||||||
|
@ -242,6 +242,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
|
|||||||
{
|
{
|
||||||
tmp = flags >> SREC_TERM_SHIFT; /* Term record */
|
tmp = flags >> SREC_TERM_SHIFT; /* Term record */
|
||||||
code_table = term_code_table;
|
code_table = term_code_table;
|
||||||
|
binbuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmp & SREC_2_BYTE_ADDR) && (targ_addr <= 0xffff))
|
if ((tmp & SREC_2_BYTE_ADDR) && (targ_addr <= 0xffff))
|
||||||
|
@ -251,7 +251,9 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
|
|||||||
CORE_ADDR func_addr, func_end, addr, stop;
|
CORE_ADDR func_addr, func_end, addr, stop;
|
||||||
CORE_ADDR stack_size;
|
CORE_ADDR stack_size;
|
||||||
int insn, rn;
|
int insn, rn;
|
||||||
int status, fp_regnum, flags;
|
int status;
|
||||||
|
int fp_regnum = 0; /* dummy, valid when (flags & MY_FRAME_IN_FP) */
|
||||||
|
int flags;
|
||||||
int framesize;
|
int framesize;
|
||||||
int register_offsets[NUM_REGS];
|
int register_offsets[NUM_REGS];
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -3292,6 +3292,8 @@ show_mipsfpu_command (char *args, int from_tty)
|
|||||||
case MIPS_FPU_NONE:
|
case MIPS_FPU_NONE:
|
||||||
fpu = "absent (none)";
|
fpu = "absent (none)";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
internal_error (__FILE__, __LINE__, "bad switch");
|
||||||
}
|
}
|
||||||
if (mips_fpu_type_auto)
|
if (mips_fpu_type_auto)
|
||||||
printf_unfiltered ("The MIPS floating-point coprocessor is set automatically (currently %s)\n",
|
printf_unfiltered ("The MIPS floating-point coprocessor is set automatically (currently %s)\n",
|
||||||
@ -4157,9 +4159,10 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
|
|||||||
ef_mips_arch = 3;
|
ef_mips_arch = 3;
|
||||||
break;
|
break;
|
||||||
case E_MIPS_ARCH_4:
|
case E_MIPS_ARCH_4:
|
||||||
ef_mips_arch = 0;
|
ef_mips_arch = 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
ef_mips_arch = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* determine the size of a pointer */
|
/* determine the size of a pointer */
|
||||||
|
@ -114,7 +114,7 @@ static CORE_ADDR
|
|||||||
mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
CORE_ADDR func_addr, func_end, addr, stop;
|
CORE_ADDR func_addr, func_end, addr, stop;
|
||||||
CORE_ADDR stack_size;
|
CORE_ADDR stack_size = 0;
|
||||||
unsigned char buf[4];
|
unsigned char buf[4];
|
||||||
int status;
|
int status;
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -1691,7 +1691,6 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
char membuf[sizeof (int) * 2 + 1];
|
char membuf[sizeof (int) * 2 + 1];
|
||||||
char *p;
|
char *p;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
int i;
|
|
||||||
|
|
||||||
monitor_debug ("MON read single\n");
|
monitor_debug ("MON read single\n");
|
||||||
#if 0
|
#if 0
|
||||||
@ -1751,29 +1750,31 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
|
|||||||
else
|
else
|
||||||
monitor_error ("monitor_read_memory_single",
|
monitor_error ("monitor_read_memory_single",
|
||||||
"bad response from monitor",
|
"bad response from monitor",
|
||||||
memaddr, i, membuf, c);
|
memaddr, 0, NULL, 0);
|
||||||
}
|
}
|
||||||
for (i = 0; i < len * 2; i++)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
|
|
||||||
while (1)
|
{
|
||||||
{
|
int i;
|
||||||
c = readchar (timeout);
|
for (i = 0; i < len * 2; i++)
|
||||||
if (isxdigit (c))
|
{
|
||||||
break;
|
int c;
|
||||||
if (c == ' ')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
monitor_error ("monitor_read_memory_single",
|
|
||||||
"bad response from monitor",
|
|
||||||
memaddr, i, membuf, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
c = readchar (timeout);
|
||||||
|
if (isxdigit (c))
|
||||||
|
break;
|
||||||
|
if (c == ' ')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
monitor_error ("monitor_read_memory_single",
|
||||||
|
"bad response from monitor",
|
||||||
|
memaddr, i, membuf, 0);
|
||||||
|
}
|
||||||
membuf[i] = c;
|
membuf[i] = c;
|
||||||
}
|
}
|
||||||
|
membuf[i] = '\000'; /* terminate the number */
|
||||||
membuf[i] = '\000'; /* terminate the number */
|
}
|
||||||
|
|
||||||
/* If TERM is present, we wait for that to show up. Also, (if TERM is
|
/* If TERM is present, we wait for that to show up. Also, (if TERM is
|
||||||
present), we will send TERM_CMD if that is present. In any case, we collect
|
present), we will send TERM_CMD if that is present. In any case, we collect
|
||||||
|
@ -1766,7 +1766,10 @@ sh_do_fp_register (int regnum)
|
|||||||
print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
|
print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
|
||||||
|
|
||||||
/* Print the value. */
|
/* Print the value. */
|
||||||
printf_filtered (inv ? "<invalid float>" : "%-10.9g", flt);
|
if (inv)
|
||||||
|
printf_filtered ("<invalid float>");
|
||||||
|
else
|
||||||
|
printf_filtered ("%-10.9g", flt);
|
||||||
|
|
||||||
/* Print the fp register as hex. */
|
/* Print the fp register as hex. */
|
||||||
printf_filtered ("\t(raw 0x");
|
printf_filtered ("\t(raw 0x");
|
||||||
|
@ -2381,6 +2381,8 @@ sparc64_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
|
|||||||
fpreg = FP0_REGNUM + 2 * register_counter;
|
fpreg = FP0_REGNUM + 2 * register_counter;
|
||||||
register_counter += 2;
|
register_counter += 2;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
internal_error (__FILE__, __LINE__, "bad switch");
|
||||||
}
|
}
|
||||||
write_register_bytes (REGISTER_BYTE (fpreg),
|
write_register_bytes (REGISTER_BYTE (fpreg),
|
||||||
VALUE_CONTENTS (args[i]),
|
VALUE_CONTENTS (args[i]),
|
||||||
|
@ -356,7 +356,8 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
|
|||||||
|
|
||||||
for (current_pc = func_addr; current_pc < prologue_end;)
|
for (current_pc = func_addr; current_pc < prologue_end;)
|
||||||
{
|
{
|
||||||
int insn, insn2;
|
int insn;
|
||||||
|
int insn2 = -1; /* dummy value */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf_filtered ("0x%.8lx ", (long) current_pc);
|
printf_filtered ("0x%.8lx ", (long) current_pc);
|
||||||
|
Reference in New Issue
Block a user