summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/fork-child.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 41d619690f3..49e66f7c3a0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2011-02-28 Michael Snyder <msnyder@vmware.com>
+ * fork-child.c (fork_inferior): Remove ifdef'd code and
+ unused variable.
+
* linux-thread-db.c (attach_thread): Discard unused value.
* linux-nat.c (linux_handle_extended_wait): Delete unused variable.
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index f7b027ae0d8..bb173e7cac9 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -367,12 +367,11 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
/* Otherwise, we directly exec the target program with
execvp. */
int i;
- char *errstring;
execvp (exec_file, argv);
/* If we get here, it's an error. */
- errstring = safe_strerror (errno);
+ safe_strerror (errno);
fprintf_unfiltered (gdb_stderr, "Cannot exec %s ", exec_file);
i = 1;
@@ -384,10 +383,6 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
i++;
}
fprintf_unfiltered (gdb_stderr, ".\n");
-#if 0
- /* This extra info seems to be useless. */
- fprintf_unfiltered (gdb_stderr, "Got error %s.\n", errstring);
-#endif
gdb_flush (gdb_stderr);
_exit (0177);
}