weidai11 / cryptopp

free C++ class library of cryptographic schemes
https://cryptopp.com
Other
4.82k stars 1.49k forks source link

variable 'j' set but not used #1288

Open jolaf opened 1 month ago

jolaf commented 1 month ago

Building cryptopp-cmake v8.9.0 with cmake v3.22.1 under Android Studio on Windows 10 produces the following warning:

C/C++: ninja: Entering directory `[...]'
C/C++: [...]/cryptopp-cmake/cryptopp/validat1.cpp:1053:31: warning: variable 'j' set but not used [-Wunused-but-set-variable]
C/C++:  1053 |             for (unsigned int j=0; !source.AnyRetrievable(); ++j)
C/C++:       |                               ^
C/C++: 1 warning generated.
jolaf commented 2 weeks ago

I'm not sure why for loop is used, probably it should have been while (!source.AnyRetrievable()) ?