RFR: 8372384: Remove unused local variable in MacroAssembler::sha512_update_sha_state on PPC

Martin Doerr mdoerr at openjdk.org
Mon Dec 29 11:03:57 UTC 2025


On Mon, 24 Nov 2025 08:05:15 GMT, wb-ly878512 <duke at openjdk.org> wrote:

> Issue
> -----
> https://bugs.openjdk.org/browse/JDK-8372384
> Summary
> -------
> Remove an unused local variable from the PowerPC SHA-512 macro assembler implementation.
> Problem
> -------
> `MacroAssembler::sha512_update_sha_state` in `macroAssembler_ppc_sha.cpp` defines a local constant:
>   static const int total_inis = sizeof(inis)/sizeof(VectorRegister);
> which is never used. This triggers static analysis warnings (e.g. “unused variable” / “dead code”) and slightly reduces code clarity, although it has no impact on correctness or runtime behavior.
> The rest of the function relies only on `total_hs` and the implicit relation between `hs` and `inis`. The unused `total_inis` appears to be left over from an earlier version of the code or a refactoring.
> Solution
> --------
> Remove the unused local variable `total_inis` and keep the existing logic unchanged.
> Testing
> -------
> Trivial change. No additional testing.

Thanks for cleaning it up!
It would be helpful to enable GitHub Actions in your repo. That will enable automatic builds and tests.
The change is ready for integration. You can also use `/integrate delegate` if you want somebody else to do it.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28472#issuecomment-3696178770


More information about the hotspot-dev mailing list