[Bug 40128] New: Wrong logic in print once
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(a)winehq.org Reporter: isakov-sl(a)bk.ru CC: erich.e.hoover(a)wine-staging.com, michael(a)fds-team.de, sebastian(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #1 from Dmitry Timoshkov <dmitry(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #2 from Sergey Isakov <isakov-sl(a)bk.ru> --- Invalid? Did you see the difference between "||" and "&&"? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #3 from Dmitry Timoshkov <dmitry(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Sebastian Lackner <sebastian(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #5 from Sergey Isakov <isakov-sl(a)bk.ru> --- Anyway "|| !once++" has no sense, because most time it means "|| FALSE", nothing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #6 from Sebastian Lackner <sebastian(a)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. ;) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 --- Comment #7 from Sergey Isakov <isakov-sl(a)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. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=40128 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Austin English <austinenglish(a)gmail.com> --- Closing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org