mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
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.
This commit is contained in:

committed by
Andrew Burgess

parent
e9a433bf19
commit
5294d882eb
@ -335,7 +335,6 @@ split_find_device (struct hw *current,
|
|||||||
else if (strncmp (spec->path, "./", strlen ("./")) == 0)
|
else if (strncmp (spec->path, "./", strlen ("./")) == 0)
|
||||||
{
|
{
|
||||||
/* cd ./... */
|
/* cd ./... */
|
||||||
current = current;
|
|
||||||
spec->path += strlen ("./");
|
spec->path += strlen ("./");
|
||||||
}
|
}
|
||||||
else if (strncmp (spec->path, "../", strlen ("../")) == 0)
|
else if (strncmp (spec->path, "../", strlen ("../")) == 0)
|
||||||
@ -348,7 +347,6 @@ split_find_device (struct hw *current,
|
|||||||
else if (strcmp (spec->path, ".") == 0)
|
else if (strcmp (spec->path, ".") == 0)
|
||||||
{
|
{
|
||||||
/* cd . */
|
/* cd . */
|
||||||
current = current;
|
|
||||||
spec->path += strlen (".");
|
spec->path += strlen (".");
|
||||||
}
|
}
|
||||||
else if (strcmp (spec->path, "..") == 0)
|
else if (strcmp (spec->path, "..") == 0)
|
||||||
|
@ -306,7 +306,6 @@ split_find_device(device *current,
|
|||||||
}
|
}
|
||||||
else if (strncmp(spec->path, "./", strlen("./")) == 0) {
|
else if (strncmp(spec->path, "./", strlen("./")) == 0) {
|
||||||
/* cd ./... */
|
/* cd ./... */
|
||||||
current = current;
|
|
||||||
spec->path += strlen("./");
|
spec->path += strlen("./");
|
||||||
}
|
}
|
||||||
else if (strncmp(spec->path, "../", strlen("../")) == 0) {
|
else if (strncmp(spec->path, "../", strlen("../")) == 0) {
|
||||||
@ -317,7 +316,6 @@ split_find_device(device *current,
|
|||||||
}
|
}
|
||||||
else if (strcmp(spec->path, ".") == 0) {
|
else if (strcmp(spec->path, ".") == 0) {
|
||||||
/* cd . */
|
/* cd . */
|
||||||
current = current;
|
|
||||||
spec->path += strlen(".");
|
spec->path += strlen(".");
|
||||||
}
|
}
|
||||||
else if (strcmp(spec->path, "..") == 0) {
|
else if (strcmp(spec->path, "..") == 0) {
|
||||||
|
Reference in New Issue
Block a user