On 06/22/2018 07:13 AM, Peter Maydell wrote:
On 22 June 2018 at 13:12, Eric Blake <[email protected]> wrote:Uurgh. It's a false positive (the compiler is complaining that the variable is uninitialized, which can only happen if the while loop is not executed; but the preconditions guarantee the loop executes at least once). The assert() that I added was enough to silence gcc 7.3.1 on my Fedora 27 system, but docker-mingw@fedora is using gcc-8.1.1-1.fc28.x86_64. This should silence things (another way to silence would be rewriting while{} into do{}while). I'll submit this as a formal patch if I can reproduce the problem/fix on docker.Huh. I had thought this was an old-gcc problem, not a new-gcc one. Might be worth submitting to the gcc folks as a regression...
Hmm, I couldn't quickly reproduce it with a direct gcc on Fedora 28; and I don't know docker well enough to know if the cross-gcc used in docker-mingw@fedora is a different version than the native gcc-8.1.1 listed in the installed packages list (the patchew output doesn't list the version of x86_64-w64-mingw32-gcc). Thus, I can't tell if it is a recent gcc regression or merely an old-gcc issue. But I can confirm that 'make docker-test-mingw@fedora' reproduced the problem without my cleanup patch, and that my cleanup patch now in master made that happy again.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
