public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: Remove self-assignments
@ 2022-10-11 14:19 Andrew Burgess
0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-10-11 14:19 UTC (permalink / raw)
To: gdb-cvs
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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-11 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 14:19 [binutils-gdb] sim: Remove self-assignments Andrew Burgess
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).