[PATCH v2 1/5] sim: Remove self-assignments
Tsukasa OI
research_trasio@irq.a4lg.com
Sun Sep 25 08:42:02 GMT 2022
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 two redundant self-assignments.
sim/ChangeLog:
* common/hw-tree.c (split_find_device): Remove redundant
self-assignments.
---
sim/common/hw-tree.c | 2 --
1 file changed, 2 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)
--
2.34.1
More information about the Gdb-patches
mailing list