mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
cleanup warnings
This commit is contained in:
parent
5ade8903bd
commit
f558f2708d
5 changed files with 8 additions and 6 deletions
|
@ -262,7 +262,7 @@ public class ProjectTargets {
|
||||||
*/
|
*/
|
||||||
protected void translateDocumentToCDTProject(Document doc) throws CoreException, IOException {
|
protected void translateDocumentToCDTProject(Document doc) throws CoreException, IOException {
|
||||||
ICDescriptor descriptor;
|
ICDescriptor descriptor;
|
||||||
descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject());
|
descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject(), true);
|
||||||
|
|
||||||
Element rootElement = descriptor.getProjectData(MAKE_TARGET_KEY);
|
Element rootElement = descriptor.getProjectData(MAKE_TARGET_KEY);
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ public class ProjectTargets {
|
||||||
try {
|
try {
|
||||||
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
|
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
|
||||||
ICDescriptor descriptor;
|
ICDescriptor descriptor;
|
||||||
descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject());
|
descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject(), true);
|
||||||
|
|
||||||
rootElement = descriptor.getProjectData(MAKE_TARGET_KEY);
|
rootElement = descriptor.getProjectData(MAKE_TARGET_KEY);
|
||||||
} catch (ParserConfigurationException e) {
|
} catch (ParserConfigurationException e) {
|
||||||
|
|
|
@ -87,7 +87,9 @@ public class GNUMakefileUtil extends PosixMakefileUtil {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if (line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE)) {
|
if (line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE)) {
|
||||||
int i = 8;
|
int i = 8;
|
||||||
for (; i < line.length() && Character.isWhitespace(line.charAt(i)); i++);
|
while(i < line.length() && Character.isWhitespace(line.charAt(i))) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
if (line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE, i)) {
|
if (line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE, i)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ public final class ScannerConfigUtil {
|
||||||
public static IPath getDiscoveredScannerConfigStore(IProject project, boolean delete) {
|
public static IPath getDiscoveredScannerConfigStore(IProject project, boolean delete) {
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
try {
|
try {
|
||||||
String fileName = (String) project.getPersistentProperty(discoveredScannerConfigFileNameProperty);
|
String fileName = project.getPersistentProperty(discoveredScannerConfigFileNameProperty);
|
||||||
if (fileName == null) {
|
if (fileName == null) {
|
||||||
fileName = String.valueOf(sRandom.nextLong()) + ".sc"; //$NON-NLS-1$
|
fileName = String.valueOf(sRandom.nextLong()) + ".sc"; //$NON-NLS-1$
|
||||||
project.setPersistentProperty(discoveredScannerConfigFileNameProperty, fileName);
|
project.setPersistentProperty(discoveredScannerConfigFileNameProperty, fileName);
|
||||||
|
|
|
@ -263,7 +263,7 @@ public class ScannerInfoConsoleParserUtility implements IScannerInfoConsoleParse
|
||||||
pwd = dir.removeFirstSegments(fBaseDirectory.segmentCount());
|
pwd = dir.removeFirstSegments(fBaseDirectory.segmentCount());
|
||||||
} else {
|
} else {
|
||||||
// check if it is a cygpath
|
// check if it is a cygpath
|
||||||
if (dir.toString().startsWith("/cygdrive/")) { // $NON-NLS-1$
|
if (dir.toString().startsWith("/cygdrive/")) { //$NON-NLS-1$
|
||||||
char driveLetter = dir.toString().charAt(10);
|
char driveLetter = dir.toString().charAt(10);
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
buf.append(driveLetter);
|
buf.append(driveLetter);
|
||||||
|
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
||||||
* @author vhirsl
|
* @author vhirsl
|
||||||
*/
|
*/
|
||||||
public class TraceUtil {
|
public class TraceUtil {
|
||||||
public static final String EOL = System.getProperty("line.separator");
|
public static final String EOL = System.getProperty("line.separator"); //$NON-NLS-1$
|
||||||
public static boolean SCANNER_CONFIG = false;
|
public static boolean SCANNER_CONFIG = false;
|
||||||
|
|
||||||
public static boolean isTracing() {
|
public static boolean isTracing() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue