From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id B05A83857C59; Tue, 11 Oct 2022 14:19:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B05A83857C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665497956; bh=2tGpwVHweuXP2JvZEteuX1RzOcFzAbQx9Jq2NgVYpus=; h=From:To:Subject:Date:From; b=ge+PjyF8PsONZUQ7q+6Hjt8KRSnlo7NkpHo1+bE5deixiqAz4j7Yhcxp9Mju9Nbwv y3UiAgPQ6iHxubZzimNuEf5/GfD6i6LikRHok6AODcxfpuXmoG6FyDp69rvak05OoX n3UiJI2m7MfZUnduxxcRcc5BCsN5pK/3o3lOOSbo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: Remove self-assignments X-Act-Checkin: binutils-gdb X-Git-Author: Tsukasa OI X-Git-Refname: refs/heads/master X-Git-Oldrev: e9a433bf192ddcadc7e948ef3b4e0ca64f3396e7 X-Git-Newrev: 5294d882ebb5b10f8a246f2c51ffef05622ef16c Message-Id: <20221011141916.B05A83857C59@sourceware.org> Date: Tue, 11 Oct 2022 14:19:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5294d882ebb5= b10f8a246f2c51ffef05622ef16c commit 5294d882ebb5b10f8a246f2c51ffef05622ef16c Author: Tsukasa OI Date: Sun Sep 25 08:42:02 2022 +0000 sim: Remove self-assignments =20 Clang generates a warning if there is a redundant self-assignment ("-Wself-assign"). On the default configuration, it causes a build fai= lure (unless "--disable-werror" is specified). =20 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 ("./")) =3D=3D 0) { /* cd ./... */ - current =3D current; spec->path +=3D strlen ("./"); } else if (strncmp (spec->path, "../", strlen ("../")) =3D=3D 0) @@ -348,7 +347,6 @@ split_find_device (struct hw *current, else if (strcmp (spec->path, ".") =3D=3D 0) { /* cd . */ - current =3D current; spec->path +=3D strlen ("."); } else if (strcmp (spec->path, "..") =3D=3D 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("./")) =3D=3D 0) { /* cd ./... */ - current =3D current; spec->path +=3D strlen("./"); } else if (strncmp(spec->path, "../", strlen("../")) =3D=3D 0) { @@ -317,7 +316,6 @@ split_find_device(device *current, } else if (strcmp(spec->path, ".") =3D=3D 0) { /* cd . */ - current =3D current; spec->path +=3D strlen("."); } else if (strcmp(spec->path, "..") =3D=3D 0) {