Filed on behalf of Li Yang wb-ly878512@alibaba-inc.com
'MacroAssembler::sha512_update_sha_state' in 'macroAssembler_ppc_sha.cpp' defines a local constant 'total_inis' that is never used:
```
VectorRegister ini_a = VR10;
VectorRegister ini_c = VR12;
VectorRegister ini_e = VR14;
VectorRegister ini_g = VR16;
static const VectorRegister inis[] = {ini_a, ini_c, ini_e, ini_g};
static const int total_inis = sizeof(inis)/sizeof(VectorRegister);
```
The variable 'total_inis' is not referenced anywhere in the function. 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.
Proposed fix:
Remove the unused local variable 'total_inis' and keep the existing logic unchanged.
Potential impact:
No functional impact: the variable is unused and only removed.
Improves code cleanliness and avoids static analysis warnings.
'MacroAssembler::sha512_update_sha_state' in 'macroAssembler_ppc_sha.cpp' defines a local constant 'total_inis' that is never used:
```
VectorRegister ini_a = VR10;
VectorRegister ini_c = VR12;
VectorRegister ini_e = VR14;
VectorRegister ini_g = VR16;
static const VectorRegister inis[] = {ini_a, ini_c, ini_e, ini_g};
static const int total_inis = sizeof(inis)/sizeof(VectorRegister);
```
The variable 'total_inis' is not referenced anywhere in the function. 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.
Proposed fix:
Remove the unused local variable 'total_inis' and keep the existing logic unchanged.
Potential impact:
No functional impact: the variable is unused and only removed.
Improves code cleanliness and avoids static analysis warnings.