Bug 66516 - Add compiler warning for if (); {}
Summary: Add compiler warning for if (); {}
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-10 11:02 EDT by Matthew Conway CLA
Modified: 2004-06-10 18:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Conway CLA 2004-06-10 11:02:52 EDT
If I have the following code, doSomething() happens everytime, and it takes me a
while to figure why the heck expr is true when it should be false =)

if (expr);
{
    doSomething();
}
Comment 1 Olivier Thomann CLA 2004-06-10 13:53:30 EDT
This would be handled by the warning for empty statement.
Check the compiler preference page (second item from the bottom on the Style tab
folder).
Comment 2 Philipe Mulet CLA 2004-06-10 18:06:39 EDT
Indeed, we have now ability to flag empty control flow statements.