From bcbd1de94d2f0f1b254a7f506dfce9c0f158ecb4 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 1 Mar 2011 00:52:19 +0000 Subject: [PATCH] 2011-02-28 Michael Snyder * fork-child.c (fork_inferior): Remove ifdef'd code and unused variable. --- gdb/ChangeLog | 3 +++ gdb/fork-child.c | 7 +------ 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 + * 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); } -- 2.30.2