[Bug c/122555] error: variable '' set but not used [-Werror=unused-but-set-variable=]

rudi at heitbaum dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 4 09:13:11 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122555

--- Comment #4 from rudi at heitbaum dot com ---
(In reply to Andrew Pinski from comment #3)
> .
> 
> Note clang does not warn here as it considers (-= 1) as an use even though
> it does not considers ++ an use. I wonder if that is why the code uses -= 1
> to get around the warning rather than removing the variable.

Looks like the code hasn’t been touched in 7 years.
https://github.com/nss-dev/nss/tree/master/cmd/rsaperf

I have proposed a patch to drop the variable in the Mozilla bug report.


More information about the Gcc-bugs mailing list