mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Fixed a few compiler warnings.
This commit is contained in:
parent
90b40763b4
commit
6936409241
4 changed files with 7 additions and 22 deletions
|
@ -118,7 +118,7 @@ public class MacroExpansionHandler {
|
||||||
int eOff = mName.getFileLocation().getNodeOffset();
|
int eOff = mName.getFileLocation().getNodeOffset();
|
||||||
int eLength = mName.getFileLocation().getNodeLength();
|
int eLength = mName.getFileLocation().getNodeLength();
|
||||||
if(eOff < nOff && Math.abs((eOff+eLength-nOff)) < 3) {
|
if(eOff < nOff && Math.abs((eOff+eLength-nOff)) < 3) {
|
||||||
scribe.print(mName.toString() + " ");
|
scribe.print(mName.toString() + " "); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,6 +445,9 @@ public class TrailNodeEqualityChecker implements EqualityChecker<IASTNode> {
|
||||||
}else {
|
}else {
|
||||||
IType oType = getType(trailName.getRealName().resolveBinding());
|
IType oType = getType(trailName.getRealName().resolveBinding());
|
||||||
IType nType = getType(name.resolveBinding());
|
IType nType = getType(name.resolveBinding());
|
||||||
|
if (oType == null || nType == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if(oType.isSameType(nType)) {
|
if(oType.isSameType(nType)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -459,25 +462,7 @@ public class TrailNodeEqualityChecker implements EqualityChecker<IASTNode> {
|
||||||
return var.getType();
|
return var.getType();
|
||||||
}
|
}
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
return new NullType();
|
|
||||||
}
|
}
|
||||||
return new NullType();
|
return null;
|
||||||
}
|
|
||||||
|
|
||||||
private class NullType implements IType{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object clone() {
|
|
||||||
try {
|
|
||||||
return super.clone();
|
|
||||||
} catch (CloneNotSupportedException e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSameType(IType type) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -915,7 +915,7 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
*/
|
*/
|
||||||
public ContextTypeRegistry getCodeTemplateContextRegistry() {
|
public ContextTypeRegistry getCodeTemplateContextRegistry() {
|
||||||
if (fCodeTemplateContextTypeRegistry == null) {
|
if (fCodeTemplateContextTypeRegistry == null) {
|
||||||
fCodeTemplateContextTypeRegistry= new ContributionContextTypeRegistry("org.eclipse.cdt.ui.codeTemplates");
|
fCodeTemplateContextTypeRegistry= new ContributionContextTypeRegistry("org.eclipse.cdt.ui.codeTemplates"); //$NON-NLS-1$
|
||||||
|
|
||||||
CodeTemplateContextType.registerContextTypes(fCodeTemplateContextTypeRegistry);
|
CodeTemplateContextType.registerContextTypes(fCodeTemplateContextTypeRegistry);
|
||||||
FileTemplateContextType.registerContextTypes(fCodeTemplateContextTypeRegistry);
|
FileTemplateContextType.registerContextTypes(fCodeTemplateContextTypeRegistry);
|
||||||
|
|
|
@ -227,7 +227,7 @@ public final class RegexErrorParserOptionPage extends AbstractCOptionPage {
|
||||||
// TODO: remove the warning before 6.1
|
// TODO: remove the warning before 6.1
|
||||||
MessageLine errorImageLabel = new MessageLine(composite, SWT.NONE);
|
MessageLine errorImageLabel = new MessageLine(composite, SWT.NONE);
|
||||||
errorImageLabel.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
|
errorImageLabel.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
|
||||||
errorImageLabel.setText("Error Parser Options user entries may be lost on CDT update as persistence will be finalized with CDT 6.1 final release.");
|
errorImageLabel.setText("Error Parser Options user entries may be lost on CDT update as persistence will be finalized with CDT 6.1 final release."); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
setControl(group);
|
setControl(group);
|
||||||
|
|
Loading…
Add table
Reference in a new issue