[v2,1/5] sim: Remove self-assignments

Message ID 467c6b15e89b2ce88a445eca8bc802ba37da8238.1664095312.git.research_trasio@irq.a4lg.com
State Superseded
Headers
Series sim: Suppress warnings if built with Clang |

Commit Message

Tsukasa OI Sept. 25, 2022, 8:42 a.m. UTC
  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(-)
  

Patch

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)