This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In situation like while (($f = mysql_fetch_assoc($res)) != NULL) possible accidental assignment warning shouldn't appear.
I don't think comparison is a good criteria for switching it off, such code is still dangerous. It should be possible to switch this warning off for the while statement *** This issue has been marked as a duplicate of 142797 ***
It's not a duplicate of 142797. We can use same code with if. Also, here is a user note (who initially reported the issue): > I do know I can turn that off but it's saved me more than once from using A=B when I meant A==B. If you still think that it's not a good idea, please close the issue as WONTFIX.
I second that, I have voted for this issue!
Upgrading to a P2 defect due to multiple user requests
*** Issue 151396 has been marked as a duplicate of this issue. ***
fixed by adding hint cfg option: "Ignore assignments in sub-statements", which is now on by default http://hg.netbeans.org/main/rev/faebbc45c64
Integrated into 'main-golden', will be available in build *200812011401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/faebbc45c644 User: Tomasz Slota <tslota@netbeans.org> Log: #147259: turn off accidental assignment warning if comparison exists
Verified