]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sim: ppc: workaround uninitialized variable compiler warnings
authorMike Frysinger <vapier@gentoo.org>
Wed, 3 Jan 2024 08:38:35 +0000 (03:38 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 9 Jan 2024 01:13:22 +0000 (20:13 -0500)
commit92bdeb2888729eec6e699ef1cf5c3fc4c2db886e
treeb8652d453ea7d9b150d17a13e41870f4b4a4590b
parent9f17cdda31504ee821112a88323306cc81ac93cf
sim: ppc: workaround uninitialized variable compiler warnings

Some compilers don't understand the semctl API and think it's an input
argument even when it's used as an output, and then complains that it
is being used uninitialized.  Zero it out explicitly to workaround it.
This adds some runtime overhead, but should be fairly minor as it's a
small stack buffer, and shouldn't be that relevant relative to all the
other logic in these functions.
sim/ppc/hw_sem.c