Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msvc: temporary workaround for C4789 false positive #9031

Merged
merged 1 commit into from Aug 16, 2020

Conversation

shuffle2
Copy link
Contributor

Prevents the following, which appears to be bogus:

Wiimote.cpp(343): error C2220: the following warning is treated as an error
Wiimote.cpp(343): warning C4789: buffer 'rpt' of size 1 bytes will be overrun; 2 bytes will be written starting at offset 0

After some experimenting, it appears to be a fairly hard to hit edge case (as also evidenced by the fact that no code in the rest of dolphin triggers it). It has to do with the /permissive- flag and the exact way the struct is declared, concerning the ordering of named/unnamed fields. It also only repros on unoptimized builds (e.g. dolphin's Debug target).

Afterwards (and with Qt 5.15.0), dolphin builds fine on current msvc: Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111

@jordan-woyak jordan-woyak merged commit b5241d1 into dolphin-emu:master Aug 16, 2020
10 checks passed
@shuffle2 shuffle2 deleted the msvc-overflow-workaround branch August 16, 2020 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants