diff options
author | Tsukasa OI <research_trasio@irq.a4lg.com> | 2022-09-25 08:42:02 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-10-11 15:18:14 +0100 |
commit | 5294d882ebb5b10f8a246f2c51ffef05622ef16c (patch) | |
tree | caee9c913f27d5f9ec18403c9269f49a472a096e | |
parent | e9a433bf192ddcadc7e948ef3b4e0ca64f3396e7 (diff) | |
download | gdb-5294d882ebb5b10f8a246f2c51ffef05622ef16c.zip gdb-5294d882ebb5b10f8a246f2c51ffef05622ef16c.tar.gz gdb-5294d882ebb5b10f8a246f2c51ffef05622ef16c.tar.bz2 |
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.
-rw-r--r-- | sim/common/hw-tree.c | 2 | ||||
-rw-r--r-- | sim/ppc/tree.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c index 5631933..8bb5ac7 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 6d20665..05532bb 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) { |