public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] sim: Remove self-assignments
Date: Tue, 11 Oct 2022 14:19:16 +0000 (GMT)	[thread overview]
Message-ID: <20221011141916.B05A83857C59@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5294d882ebb5b10f8a246f2c51ffef05622ef16c

commit 5294d882ebb5b10f8a246f2c51ffef05622ef16c
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Sun Sep 25 08:42:02 2022 +0000

    sim: Remove self-assignments
    
    Clang generates a warning if there is a redundant self-assignment
    ("-Wself-assign").  On the default configuration, it causes a build failure
    (unless "--disable-werror" is specified).
    
    This commit removes redundant self-assignments from two files.

Diff:
---
 sim/common/hw-tree.c | 2 --
 sim/ppc/tree.c       | 2 --
 2 files changed, 4 deletions(-)

diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
index 56319333d76..8bb5ac77545 100644
--- a/sim/common/hw-tree.c
+++ b/sim/common/hw-tree.c
@@ -335,7 +335,6 @@ split_find_device (struct hw *current,
       else if (strncmp (spec->path, "./", strlen ("./")) == 0)
 	{
 	  /* cd ./... */
-	  current = current;
 	  spec->path += strlen ("./");
 	}
       else if (strncmp (spec->path, "../", strlen ("../")) == 0)
@@ -348,7 +347,6 @@ split_find_device (struct hw *current,
       else if (strcmp (spec->path, ".") == 0)
 	{
 	  /* cd . */
-	  current = current;
 	  spec->path += strlen (".");
 	}
       else if (strcmp (spec->path, "..") == 0)
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index 6d20665505e..05532bb47ee 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -306,7 +306,6 @@ split_find_device(device *current,
     }
     else if (strncmp(spec->path, "./", strlen("./")) == 0) {
       /* cd ./... */
-      current = current;
       spec->path += strlen("./");
     }
     else if (strncmp(spec->path, "../", strlen("../")) == 0) {
@@ -317,7 +316,6 @@ split_find_device(device *current,
     }
     else if (strcmp(spec->path, ".") == 0) {
       /* cd . */
-      current = current;
       spec->path += strlen(".");
     }
     else if (strcmp(spec->path, "..") == 0) {

                 reply	other threads:[~2022-10-11 14:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221011141916.B05A83857C59@sourceware.org \
    --to=aburgess@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).