https://bugs.winehq.org/show_bug.cgi?id=40128
Bug ID: 40128 Summary: Wrong logic in print once Product: Wine-staging Version: 1.9.3 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: isakov-sl@bk.ru CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de
dlls/wined3d/state.c: 369 ~~~~ if (factor || !once++) FIXME("Unhandled blend factor %#x.\n", factor); ~~~~
There must be "&&" to print the FIXME really once.
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Sergey Isakov from comment #0)
dlls/wined3d/state.c: 369
if (factor || !once++) FIXME("Unhandled blend factor %#x.\n", factor);
There must be "&&" to print the FIXME really once.
That's how it's supposed to work: https://github.com/wine-compholio/wine-staging/tree/master/patches/wined3d-U...
I'll leave the decision to Sebastian to resolve this bug as invalid.
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #2 from Sergey Isakov isakov-sl@bk.ru --- Invalid? Did you see the difference between "||" and "&&"?
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Sergey Isakov from comment #2)
Invalid? Did you see the difference between "||" and "&&"?
The patch subject "wined3d: Silence repeated 'Unhandled blend factor 0' messages." implies that this is intended behaviour.
https://bugs.winehq.org/show_bug.cgi?id=40128
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- As Dmitry already pointed out, the check is intentionally written like that. The purpose is to filter only 'Unhandled blend factor 0' messages. When factor != 0, the message is printed more than once.
The patch was added a while ago when I was debugging an application where only this message was spammed very frequently.
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #5 from Sergey Isakov isakov-sl@bk.ru --- Anyway "|| !once++" has no sense, because most time it means "|| FALSE", nothing.
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #6 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Sergey Isakov from comment #5)
Anyway "|| !once++" has no sense, because most time it means "|| FALSE", nothing.
I assume you make wrong assumptions about evaluation order of arguments in if() conditions. The second term is not evaluated at all if the first condition is false. Nevertheless, this bug tracker is not the right place to discuss about C standards. You will have to believe me that its correct or look it up on your own. ;)
https://bugs.winehq.org/show_bug.cgi?id=40128
--- Comment #7 from Sergey Isakov isakov-sl@bk.ru --- (In reply to Sebastian Lackner from comment #4)
As Dmitry already pointed out, the check is intentionally written like that. The purpose is to filter only 'Unhandled blend factor 0' messages. When factor != 0, the message is printed more than once.
The patch was added a while ago when I was debugging an application where only this message was spammed very frequently.
OK, I just didn't understand your purpose.
https://bugs.winehq.org/show_bug.cgi?id=40128
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Austin English austinenglish@gmail.com --- Closing.