gdb/gdb-6.3-warnings-20050317.patch
Jan Kratochvil 8336d588bf - Package review, analysed by Ralf Corsepius (BZ 225783).
- Fix prelink(8) testcase for non-root $PATH missing `/usr/sbin' (BZ
    225783).
- Fix debugging GDB itself - the compiled in source files paths (BZ
    225783).
- Fix harmless GCORE stack buffer overflow, by _FORTIFY_SOURCE=2 (BZ
    235753).
- Fix XML support - the build was missing `expat-devel'.
- Updated the `info' files handling by the spec file.
- Building now with the standard Fedora code protections -
    _FORTIFY_SOURCE=2.
- Use multiple CPUs for the build (%{?_smp_mflags}).
- Separate testsuite run to its %check section.
- Fix (remove) non-ASCII spec file characters.
- Remove system tools versions dumping - already present in mock build
    logs.
- Reverts: rhbz#235197
- Related: rhbz#235197 rhbz#225783
- Resolves: rhbz#235753
2007-04-24 15:57:25 +00:00

665 lines
21 KiB
Diff

Index: gdb-6.6/gdb/mi/mi-cmd-env.c
===================================================================
--- gdb-6.6.orig/gdb/mi/mi-cmd-env.c
+++ gdb-6.6/gdb/mi/mi-cmd-env.c
@@ -126,7 +126,7 @@ mi_cmd_env_path (char *command, char **a
static struct mi_opt opts[] =
{
{"r", RESET_OPT, 0},
- 0
+ {0}
};
dont_repeat ();
@@ -198,7 +198,7 @@ mi_cmd_env_dir (char *command, char **ar
static struct mi_opt opts[] =
{
{"r", RESET_OPT, 0},
- 0
+ {0}
};
dont_repeat ();
Index: gdb-6.6/gdb/mi/mi-getopt.c
===================================================================
--- gdb-6.6.orig/gdb/mi/mi-getopt.c
+++ gdb-6.6/gdb/mi/mi-getopt.c
@@ -82,7 +82,7 @@ mi_valid_noargs (const char *prefix, int
char *optarg;
static struct mi_opt opts[] =
{
- 0
+ {0}
};
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) == -1)
Index: gdb-6.6/gdb/mi/mi-cmd-break.c
===================================================================
--- gdb-6.6.orig/gdb/mi/mi-cmd-break.c
+++ gdb-6.6/gdb/mi/mi-cmd-break.c
@@ -90,7 +90,7 @@ mi_cmd_break_insert (char *command, char
{"c", CONDITION_OPT, 1},
{"i", IGNORE_COUNT_OPT, 1},
{"p", THREAD_OPT, 1},
- 0
+ {0}
};
/* Parse arguments. It could be -r or -h or -t, <location> or ``--''
@@ -196,7 +196,7 @@ mi_cmd_break_watch (char *command, char
{
{"r", READ_OPT, 0},
{"a", ACCESS_OPT, 0},
- 0
+ {0}
};
/* Parse arguments. */
Index: gdb-6.6/gdb/mi/mi-cmd-disas.c
===================================================================
--- gdb-6.6.orig/gdb/mi/mi-cmd-disas.c
+++ gdb-6.6/gdb/mi/mi-cmd-disas.c
@@ -84,7 +84,7 @@ mi_cmd_disassemble (char *command, char
{"n", NUM_OPT, 1},
{"s", START_OPT, 1},
{"e", END_OPT, 1},
- 0
+ {0}
};
/* Get the options with their arguments. Keep track of what we
Index: gdb-6.6/gdb/mi/mi-main.c
===================================================================
--- gdb-6.6.orig/gdb/mi/mi-main.c
+++ gdb-6.6/gdb/mi/mi-main.c
@@ -773,7 +773,7 @@ mi_cmd_data_read_memory (char *command,
static struct mi_opt opts[] =
{
{"o", OFFSET_OPT, 1},
- 0
+ {0}
};
while (1)
@@ -973,7 +973,7 @@ mi_cmd_data_write_memory (char *command,
static struct mi_opt opts[] =
{
{"o", OFFSET_OPT, 1},
- 0
+ {0}
};
while (1)
Index: gdb-6.6/gdb/p-valprint.c
===================================================================
--- gdb-6.6.orig/gdb/p-valprint.c
+++ gdb-6.6/gdb/p-valprint.c
@@ -753,7 +753,7 @@ pascal_object_print_value_fields (struct
int dont_print_statmem)
{
int i, len, n_baseclasses;
- struct obstack tmp_obstack;
+ struct obstack tmp_obstack = {0};
char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
CHECK_TYPEDEF (type);
@@ -922,7 +922,7 @@ pascal_object_print_value (struct type *
enum val_prettyprint pretty,
struct type **dont_print_vb)
{
- struct obstack tmp_obstack;
+ struct obstack tmp_obstack = {0};
struct type **last_dont_print
= (struct type **) obstack_next_free (&dont_print_vb_obstack);
int i, n_baseclasses = TYPE_N_BASECLASSES (type);
Index: gdb-6.6/gdb/cp-valprint.c
===================================================================
--- gdb-6.6.orig/gdb/cp-valprint.c
+++ gdb-6.6/gdb/cp-valprint.c
@@ -265,7 +265,7 @@ cp_print_value_fields (struct type *type
struct type **dont_print_vb,int dont_print_statmem)
{
int i, len, n_baseclasses;
- struct obstack tmp_obstack;
+ struct obstack tmp_obstack = {0};
char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
int fields_seen = 0;
@@ -524,7 +524,7 @@ cp_print_value (struct type *type, struc
struct ui_file *stream, int format, int recurse,
enum val_prettyprint pretty, struct type **dont_print_vb)
{
- struct obstack tmp_obstack;
+ struct obstack tmp_obstack = {0};
struct type **last_dont_print
= (struct type **) obstack_next_free (&dont_print_vb_obstack);
int i, n_baseclasses = TYPE_N_BASECLASSES (type);
Index: gdb-6.6/gdb/tui/tui-layout.c
===================================================================
--- gdb-6.6.orig/gdb/tui/tui-layout.c
+++ gdb-6.6/gdb/tui/tui-layout.c
@@ -755,7 +755,7 @@ show_source_disasm_command (void)
if (TUI_DISASM_WIN == NULL)
{
make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
- init_and_make_win ((void **) & locator,
+ init_and_make_win ((void **)(char *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
tui_term_width (),
@@ -848,7 +848,7 @@ show_data (enum tui_layout_type new_layo
make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
else
make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
- init_and_make_win ((void **) & locator,
+ init_and_make_win ((void **)(char *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
tui_term_width (),
@@ -963,7 +963,7 @@ make_source_or_disasm_window (struct tui
execution_info = tui_source_exec_info_win_ptr ();
else
execution_info = tui_disassem_exec_info_win_ptr ();
- init_and_make_win ((void **) & execution_info,
+ init_and_make_win ((void **)(char *) & execution_info,
EXEC_INFO_WIN,
height,
3,
@@ -1013,7 +1013,7 @@ show_source_or_disasm_and_command (enum
make_source_window (win_info_ptr, src_height - 1, 0);
else
make_disasm_window (win_info_ptr, src_height - 1, 0);
- init_and_make_win ((void **) & locator,
+ init_and_make_win ((void **)(char *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
tui_term_width (),
Index: gdb-6.6/gdb/testsuite/gdb.base/move-dir.h
===================================================================
--- gdb-6.6.orig/gdb/testsuite/gdb.base/move-dir.h
+++ gdb-6.6/gdb/testsuite/gdb.base/move-dir.h
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include <stdio.h>
void other() {
const char* ostring = "other";
Index: gdb-6.6/gdb/testsuite/gdb.base/sigrepeat.c
===================================================================
--- gdb-6.6.orig/gdb/testsuite/gdb.base/sigrepeat.c
+++ gdb-6.6/gdb/testsuite/gdb.base/sigrepeat.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
+#include <stdlib.h>
#include <sys/time.h>
static volatile int done[2];
Index: gdb-6.6/gdb/s390-tdep.c
===================================================================
--- gdb-6.6.orig/gdb/s390-tdep.c
+++ gdb-6.6/gdb/s390-tdep.c
@@ -2277,6 +2277,9 @@ s390_return_value (struct gdbarch *gdbar
case RETURN_VALUE_STRUCT_CONVENTION:
error (_("Cannot set function return value."));
break;
+
+ default:
+ break;
}
}
else if (out)
@@ -2309,6 +2312,9 @@ s390_return_value (struct gdbarch *gdbar
case RETURN_VALUE_STRUCT_CONVENTION:
error (_("Function return value unknown."));
break;
+
+ default:
+ break;
}
}
Index: gdb-6.6/gdb/remote.c
===================================================================
--- gdb-6.6.orig/gdb/remote.c
+++ gdb-6.6/gdb/remote.c
@@ -2843,10 +2843,10 @@ cleanup_sigint_signal_handler (void *dum
{
signal (SIGINT, handle_sigint);
if (sigint_remote_twice_token)
- delete_async_signal_handler ((struct async_signal_handler **)
+ delete_async_signal_handler ((struct async_signal_handler **) (char *)
&sigint_remote_twice_token);
if (sigint_remote_token)
- delete_async_signal_handler ((struct async_signal_handler **)
+ delete_async_signal_handler ((struct async_signal_handler **) (char *)
&sigint_remote_token);
}
Index: gdb-6.6/gdb/f-exp.y
===================================================================
--- gdb-6.6.orig/gdb/f-exp.y
+++ gdb-6.6/gdb/f-exp.y
@@ -567,6 +567,8 @@ ptype : typebase
case tp_function:
follow_type = lookup_function_type (follow_type);
break;
+ default:
+ break;
}
$$ = follow_type;
}
Index: gdb-6.6/gdb/remote-fileio.c
===================================================================
--- gdb-6.6.orig/gdb/remote-fileio.c
+++ gdb-6.6/gdb/remote-fileio.c
@@ -1332,19 +1332,19 @@ static struct {
char *name;
void (*func)(char *);
} remote_fio_func_map[] = {
- "open", remote_fileio_func_open,
- "close", remote_fileio_func_close,
- "read", remote_fileio_func_read,
- "write", remote_fileio_func_write,
- "lseek", remote_fileio_func_lseek,
- "rename", remote_fileio_func_rename,
- "unlink", remote_fileio_func_unlink,
- "stat", remote_fileio_func_stat,
- "fstat", remote_fileio_func_fstat,
- "gettimeofday", remote_fileio_func_gettimeofday,
- "isatty", remote_fileio_func_isatty,
- "system", remote_fileio_func_system,
- NULL, NULL
+ {"open", remote_fileio_func_open},
+ {"close", remote_fileio_func_close},
+ {"read", remote_fileio_func_read},
+ {"write", remote_fileio_func_write},
+ {"lseek", remote_fileio_func_lseek},
+ {"rename", remote_fileio_func_rename},
+ {"unlink", remote_fileio_func_unlink},
+ {"stat", remote_fileio_func_stat},
+ {"fstat", remote_fileio_func_fstat},
+ {"gettimeofday", remote_fileio_func_gettimeofday},
+ {"isatty", remote_fileio_func_isatty},
+ {"system", remote_fileio_func_system},
+ {NULL, NULL}
};
static int
Index: gdb-6.6/gdb/source.c
===================================================================
--- gdb-6.6.orig/gdb/source.c
+++ gdb-6.6/gdb/source.c
@@ -172,7 +172,7 @@ get_current_source_symtab_and_line (void
void
set_default_source_symtab_and_line (void)
{
- struct symtab_and_line cursal;
+ struct symtab_and_line cursal = {0};
if (!have_full_symbols () && !have_partial_symbols ())
error (_("No symbol table is loaded. Use the \"file\" command."));
@@ -1428,7 +1428,7 @@ static void
line_info (char *arg, int from_tty)
{
struct symtabs_and_lines sals;
- struct symtab_and_line sal;
+ struct symtab_and_line sal = {0};
CORE_ADDR start_pc, end_pc;
int i;
Index: gdb-6.6/gdb/symfile.c
===================================================================
--- gdb-6.6.orig/gdb/symfile.c
+++ gdb-6.6/gdb/symfile.c
@@ -2933,6 +2933,8 @@ add_psymbol_with_dem_name_to_list (char
deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
break;
/* FIXME What should be done for the default case? Ignoring for now. */
+ default:
+ break;
}
/* val and coreaddr are mutually exclusive, one of them *will* be zero */
Index: gdb-6.6/gdb/linespec.c
===================================================================
--- gdb-6.6.orig/gdb/linespec.c
+++ gdb-6.6/gdb/linespec.c
@@ -1631,7 +1631,7 @@ static struct symtabs_and_lines
find_method (int funfirstline, char ***canonical, char *saved_arg,
char *copy, struct type *t, struct symbol *sym_class)
{
- struct symtabs_and_lines values;
+ struct symtabs_and_lines values = {0};
struct symbol *sym = 0;
int i1; /* Counter for the symbol array. */
struct symbol **sym_arr = alloca (total_number_of_methods (t)
Index: gdb-6.6/gdb/macroscope.c
===================================================================
--- gdb-6.6.orig/gdb/macroscope.c
+++ gdb-6.6/gdb/macroscope.c
@@ -33,7 +33,7 @@
struct macro_scope *
sal_macro_scope (struct symtab_and_line sal)
{
- struct macro_source_file *main, *inclusion;
+ struct macro_source_file *main_sf, *inclusion;
struct macro_scope *ms;
if (! sal.symtab
@@ -42,8 +42,8 @@ sal_macro_scope (struct symtab_and_line
ms = (struct macro_scope *) xmalloc (sizeof (*ms));
- main = macro_main (sal.symtab->macro_table);
- inclusion = macro_lookup_inclusion (main, sal.symtab->filename);
+ main_sf = macro_main (sal.symtab->macro_table);
+ inclusion = macro_lookup_inclusion (main_sf, sal.symtab->filename);
if (inclusion)
{
@@ -66,7 +66,7 @@ sal_macro_scope (struct symtab_and_line
For the time being, though, we'll just treat these as
occurring at the end of the main source file. */
- ms->file = main;
+ ms->file = main_sf;
ms->line = -1;
complaint (&symfile_complaints,
@@ -83,7 +83,6 @@ struct macro_scope *
default_macro_scope (void)
{
struct symtab_and_line sal;
- struct macro_source_file *main;
struct macro_scope *ms;
/* If there's a selected frame, use its PC. */
Index: gdb-6.6/gdb/target.c
===================================================================
--- gdb-6.6.orig/gdb/target.c
+++ gdb-6.6/gdb/target.c
@@ -1045,6 +1045,9 @@ memory_xfer_partial (struct target_ops *
if (writebuf != NULL)
error (_("Writing to flash memory forbidden in this context"));
break;
+
+ default:
+ break;
}
if (region->attrib.cache)
Index: gdb-6.6/gdb/gdb-events.c
===================================================================
--- gdb-6.6.orig/gdb/gdb-events.c
+++ gdb-6.6/gdb/gdb-events.c
@@ -321,6 +321,8 @@ gdb_events_deliver (struct gdb_events *v
case architecture_changed:
vector->architecture_changed ();
break;
+ default:
+ break;
}
delivering_events = event->next;
xfree (event);
Index: gdb-6.6/gdb/dwarf2read.c
===================================================================
--- gdb-6.6.orig/gdb/dwarf2read.c
+++ gdb-6.6/gdb/dwarf2read.c
@@ -9307,6 +9307,7 @@ dwarf_decode_macros (struct line_header
for (;;)
{
enum dwarf_macinfo_record_type macinfo_type;
+ int tmp;
/* Do we at least have room for a macinfo type byte? */
if (mac_ptr >= mac_end)
@@ -9318,13 +9319,16 @@ dwarf_decode_macros (struct line_header
macinfo_type = read_1_byte (abfd, mac_ptr);
mac_ptr++;
+ /* Check for a zero macinfo type which indicates the end of the macro
+ information. We do this as the compiler may warn us if we
+ try and look for 0 in the switch below because 0 is not
+ an enumerated value. */
+ tmp = (int)macinfo_type;
+ if (tmp == 0)
+ return;
+
switch (macinfo_type)
{
- /* A zero macinfo type indicates the end of the macro
- information. */
- case 0:
- return;
-
case DW_MACINFO_define:
case DW_MACINFO_undef:
{
Index: gdb-6.6/gdb/stabsread.c
===================================================================
--- gdb-6.6.orig/gdb/stabsread.c
+++ gdb-6.6/gdb/stabsread.c
@@ -1794,7 +1794,8 @@ again:
struct type *domain = read_type (pp, objfile);
struct type *return_type;
struct field *args;
- int nargs, varargs;
+ int nargs = 0;
+ int varargs = 0;
if (**pp != ',')
/* Invalid member type data format. */
Index: gdb-6.6/gdb/dwarf2expr.c
===================================================================
--- gdb-6.6.orig/gdb/dwarf2expr.c
+++ gdb-6.6/gdb/dwarf2expr.c
@@ -559,6 +559,8 @@ execute_stack_op (struct dwarf_expr_cont
op_ptr = read_uleb128 (op_ptr, op_end, &reg);
result += reg;
break;
+ default:
+ break;
}
break;
Index: gdb-6.6/gdb/varobj.c
===================================================================
--- gdb-6.6.orig/gdb/varobj.c
+++ gdb-6.6/gdb/varobj.c
@@ -325,10 +325,9 @@ struct language_specific
/* Array of known source language routines. */
static struct language_specific
- languages[vlang_end][sizeof (struct language_specific)] = {
+ languages[vlang_end] = {
/* Unknown (try treating as C */
- {
- vlang_unknown,
+ {vlang_unknown,
c_number_of_children,
c_name_of_variable,
c_name_of_child,
@@ -339,8 +338,7 @@ static struct language_specific
c_value_of_variable}
,
/* C */
- {
- vlang_c,
+ {vlang_c,
c_number_of_children,
c_name_of_variable,
c_name_of_child,
@@ -351,8 +349,7 @@ static struct language_specific
c_value_of_variable}
,
/* C++ */
- {
- vlang_cplus,
+ {vlang_cplus,
cplus_number_of_children,
cplus_name_of_variable,
cplus_name_of_child,
@@ -363,8 +360,7 @@ static struct language_specific
cplus_value_of_variable}
,
/* Java */
- {
- vlang_java,
+ {vlang_java,
java_number_of_children,
java_name_of_variable,
java_name_of_child,
@@ -519,7 +515,7 @@ varobj_create (char *objname,
/* Set language info */
lang = variable_language (var);
- var->root->lang = languages[lang];
+ var->root->lang = &languages[lang];
/* Set ourselves as our root */
var->root->rootvar = var;
Index: gdb-6.6/gdb/doublest.c
===================================================================
--- gdb-6.6.orig/gdb/doublest.c
+++ gdb-6.6/gdb/doublest.c
@@ -94,15 +94,10 @@ get_field (const bfd_byte *data, enum fl
{
result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
cur_bitshift += FLOATFORMAT_CHAR_BIT;
- switch (order)
- {
- case floatformat_little:
- ++cur_byte;
- break;
- case floatformat_big:
- --cur_byte;
- break;
- }
+ if (order == floatformat_little)
+ ++cur_byte;
+ else
+ --cur_byte;
}
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
/* Mask out bits which are not part of the field */
diff -u -rup gdb-6.6-orig/gdb/cli/cli-cmds.c gdb-6.6/gdb/cli/cli-cmds.c
--- gdb-6.6-orig/gdb/cli/cli-cmds.c 2007-04-08 20:49:09.000000000 +0200
+++ gdb-6.6/gdb/cli/cli-cmds.c 2007-04-08 20:54:49.000000000 +0200
@@ -323,7 +323,8 @@ pwd_command (char *args, int from_tty)
{
if (args)
error (_("The \"pwd\" command does not take an argument: %s"), args);
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+ /* Unused result. */
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
if (strcmp (gdb_dirbuf, current_directory) != 0)
printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
diff -u -rup gdb-6.6-orig/gdb/inflow.c gdb-6.6/gdb/inflow.c
--- gdb-6.6-orig/gdb/inflow.c 2006-02-10 23:01:43.000000000 +0100
+++ gdb-6.6/gdb/inflow.c 2007-04-08 20:56:48.000000000 +0200
@@ -549,17 +549,20 @@ new_tty (void)
if (tty != 0)
{
close (0);
- dup (tty);
+ /* Unused result. */
+ 1 && dup (tty);
}
if (tty != 1)
{
close (1);
- dup (tty);
+ /* Unused result. */
+ 1 && dup (tty);
}
if (tty != 2)
{
close (2);
- dup (tty);
+ /* Unused result. */
+ 1 && dup (tty);
}
if (tty > 2)
close (tty);
diff -u -rup gdb-6.6-orig/gdb/linux-nat.c gdb-6.6/gdb/linux-nat.c
--- gdb-6.6-orig/gdb/linux-nat.c 2007-04-08 20:49:11.000000000 +0200
+++ gdb-6.6/gdb/linux-nat.c 2007-04-08 20:54:08.000000000 +0200
@@ -2972,7 +2972,8 @@ linux_nat_info_proc_cmd (char *args, int
sprintf (fname1, "/proc/%lld/cmdline", pid);
if ((procfile = fopen (fname1, "r")) > 0)
{
- fgets (buffer, sizeof (buffer), procfile);
+ /* Unused result. */
+ 1 && fgets (buffer, sizeof (buffer), procfile);
printf_filtered ("cmdline = '%s'\n", buffer);
fclose (procfile);
}
diff -u -rup gdb-6.6-orig/gdb/main.c gdb-6.6/gdb/main.c
--- gdb-6.6-orig/gdb/main.c 2007-04-08 20:49:09.000000000 +0200
+++ gdb-6.6/gdb/main.c 2007-04-08 20:55:30.000000000 +0200
@@ -195,7 +195,8 @@ captured_main (void *data)
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
instream = stdin;
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+ /* Unused result. */
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
current_directory = gdb_dirbuf;
gdb_stdout = stdio_fileopen (stdout);
diff -u -rup gdb-6.6-orig/gdb/mi/mi-cmd-env.c gdb-6.6/gdb/mi/mi-cmd-env.c
--- gdb-6.6-orig/gdb/mi/mi-cmd-env.c 2007-04-08 20:49:09.000000000 +0200
+++ gdb-6.6/gdb/mi/mi-cmd-env.c 2007-04-08 20:55:11.000000000 +0200
@@ -80,7 +80,8 @@ mi_cmd_env_pwd (char *command, char **ar
/* Otherwise the mi level is 2 or higher. */
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+ /* Unused result. */
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
return MI_CMD_DONE;
diff -u -rup gdb-6.6-orig/gdb/top.c gdb-6.6/gdb/top.c
--- gdb-6.6-orig/gdb/top.c 2007-04-08 20:49:10.000000000 +0200
+++ gdb-6.6/gdb/top.c 2007-04-08 20:55:46.000000000 +0200
@@ -1643,7 +1643,8 @@ gdb_init (char *argv0)
/* Run the init function of each source file */
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+ /* Unused result. */
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
current_directory = gdb_dirbuf;
#ifdef __MSDOS__
diff -u -rup gdb-6.6-orig/gdb/ui-file.c gdb-6.6/gdb/ui-file.c
--- gdb-6.6-orig/gdb/ui-file.c 2005-12-17 23:34:03.000000000 +0100
+++ gdb-6.6/gdb/ui-file.c 2007-04-08 20:56:21.000000000 +0200
@@ -482,7 +482,8 @@ stdio_file_write (struct ui_file *file,
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
_("stdio_file_write: bad magic number"));
- fwrite (buf, length_buf, 1, stdio->file);
+ /* Unused result. */
+ 1 && fwrite (buf, length_buf, 1, stdio->file);
}
static void
diff -u -rup gdb-6.6-orig/gdb/utils.c gdb-6.6/gdb/utils.c
--- gdb-6.6-orig/gdb/utils.c 2007-04-08 20:49:09.000000000 +0200
+++ gdb-6.6/gdb/utils.c 2007-04-08 20:56:01.000000000 +0200
@@ -718,7 +718,8 @@ internal_vproblem (struct internal_probl
abort (); /* NOTE: GDB has only three calls to abort(). */
default:
dejavu = 3;
- write (STDERR_FILENO, msg, sizeof (msg));
+ /* Unused result. */
+ 1 && write (STDERR_FILENO, msg, sizeof (msg));
exit (1);
}
}