bb11f7a9fa
In main.cpp, the loop is over a local variable which would be const were it not for the multi-step initialization that I didn't want to change. The loop body clearly doesn't modify the container, so port to ranged for loop with std::as_const(). In printvolumes.cpp, the loop _does_ invoke unknown code (through the function pointer passed as the second argument), but, as could be expected, the two users of the function don't pass functions that know about `volumes`: - in the tst_QStorageInfo auto-test, an rvalue `volumes` is passed, so we don't need to analyze the qInfoPrinter function passed there, as it cannot possibly reference the temporary - and in main.cpp of the manual test, we just pass printf (which is technically UB (taking the address of a standard library function), but I don't care right now). Pick-to: 6.6 6.5 Task-number: QTBUG-115839 Change-Id: Ibcd10a0e0b3229d8f2a1d98545d8fa6d473a0f75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |