diff mbox

[1/2] remote-utils.c: remove unused gdb_stdlog

Message ID 1417449499-23681-1-git-send-email-crosa@redhat.com
State New
Headers show

Commit Message

Cleber Rosa Dec. 1, 2014, 3:58 p.m. UTC
It looks like this came from an attempt to mimmic gdb/main.c, which
has gdb_stdlog, gdb_stderr, gdb_stdout, etc. But in reality, it's
not being used on gdbserver.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 gdb/gdbserver/ChangeLog      | 4 ++++
 gdb/gdbserver/remote-utils.c | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Sergio Durigan Junior Dec. 1, 2014, 8:34 p.m. UTC | #1
On Monday, December 01 2014, Cleber Rosa wrote:

> It looks like this came from an attempt to mimmic gdb/main.c, which
> has gdb_stdlog, gdb_stderr, gdb_stdout, etc. But in reality, it's
> not being used on gdbserver.

Heya :-).

Thanks for sending the patch upstream.  As we have already discussed on
private, this looks almost obvious to me, but let's wait for some
maintainer to approve.  Meanwhile...

> Signed-off-by: Cleber Rosa <crosa@redhat.com>

We don't use Signed-off-by here, but it shouldn't do any harm to keep it
in the patch.

> ---
>  gdb/gdbserver/ChangeLog      | 4 ++++
>  gdb/gdbserver/remote-utils.c | 1 -
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
> index e378a5f..0e110e7 100644
> --- a/gdb/gdbserver/ChangeLog
> +++ b/gdb/gdbserver/ChangeLog
> @@ -1,3 +1,7 @@
> +2014-12-01  Cleber Rosa  <cleber@redhat.com>
> +
> +        * remote-utils.c: Remove unused variable.

Every entry in the ChangeLog should be indented using TABs, and not
spaces.  You could also specify *which* unused variable you are
removing.  Thus:

	* remote-utils.c: Remove unused variable "gdb_stdlog".

> +
>  2014-11-28  Yao Qi  <yao@codesourcery.com>
>  
>  	* configure.ac(AC_CHECK_FUNCS): Remove readlink.
> diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
> index 373fc15..442e94e 100644
> --- a/gdb/gdbserver/remote-utils.c
> +++ b/gdb/gdbserver/remote-utils.c
> @@ -100,7 +100,6 @@ struct sym_cache
>  };
>  
>  int remote_debug = 0;
> -struct ui_file *gdb_stdlog;
>  
>  static int remote_is_stdio = 0;
>  
> -- 
> 1.9.3

Thanks,
Joel Brobecker Dec. 3, 2014, 10:12 a.m. UTC | #2
> > It looks like this came from an attempt to mimmic gdb/main.c, which
> > has gdb_stdlog, gdb_stderr, gdb_stdout, etc. But in reality, it's
> > not being used on gdbserver.
> 
> Thanks for sending the patch upstream.  As we have already discussed on
> private, this looks almost obvious to me, but let's wait for some
> maintainer to approve.  Meanwhile...

I agree the patch is obvious. But it's a good thing it wasn't pushed
as such, considering the few little tweaks we can apply to make
the submission the best we've had this year :-).

More seriously, the patch is approved after Sergio's comments are
resolved. And also please put the ChangeLog entry also in the revision
log. Going one step further, we now tend to just "git send-email"
the patch using the commit's revision log as the email subject and body.
That way, we have the explanation for the patch in the revision log,
which makes archeology a little easier.

> > Signed-off-by: Cleber Rosa <crosa@redhat.com>
> 
> We don't use Signed-off-by here, but it shouldn't do any harm to keep it
> in the patch.

FWIW, agreed. It's not required, but acceptable as far as I am
concerned (we haven't formally discussed this, but since it seems
harmless to me, I don't see that it could be a problem).
Sergio Durigan Junior Dec. 4, 2014, 4:49 p.m. UTC | #3
On Wednesday, December 03 2014, Joel Brobecker wrote:

> I agree the patch is obvious. But it's a good thing it wasn't pushed
> as such, considering the few little tweaks we can apply to make
> the submission the best we've had this year :-).

:-)

Yeah, in any way I meant that we should go forward without a
maintainer's approval!  Just to be clear :-P.

Anyway, Cleber, I can push both patches to the repo once you fix
everything.

Chers,
diff mbox

Patch

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index e378a5f..0e110e7 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@ 
+2014-12-01  Cleber Rosa  <cleber@redhat.com>
+
+        * remote-utils.c: Remove unused variable.
+
 2014-11-28  Yao Qi  <yao@codesourcery.com>
 
 	* configure.ac(AC_CHECK_FUNCS): Remove readlink.
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 373fc15..442e94e 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -100,7 +100,6 @@  struct sym_cache
 };
 
 int remote_debug = 0;
-struct ui_file *gdb_stdlog;
 
 static int remote_is_stdio = 0;