]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - sim/h8300/compile.c
sim/h8300: avoid self assignment
authorAndrew Burgess <aburgess@redhat.com>
Wed, 19 Oct 2022 14:19:18 +0000 (15:19 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 24 Oct 2022 16:23:47 +0000 (17:23 +0100)
commitda8b81754bcd9eb2e45cec4997770a591cc61a8f
tree61842b934bd32831eb31038d62c061e873ff5301
parent36edbb454fc9e720e723923d549b9f5356657a73
sim/h8300: avoid self assignment

There are two places in the h8300 simulator where we assign a variable
to itself.  Clang gives a warning for this, which is converted into an
error by -Werror.

Silence the warning by removing the self assignments.  As these
assignments were in a complex if/then/else tree, rather than try to
adjust all the conditions, I've just replaced the self assignments
with a comment and an empty statement.
sim/h8300/compile.c