1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-08 09:35:23 +02:00

[cleanup] Fix compiler warnings

This commit is contained in:
Martin Oberhuber 2006-08-25 14:14:48 +00:00
parent 6666e89126
commit 659b31dad8
4 changed files with 41 additions and 39 deletions

View file

@ -807,16 +807,16 @@ public class ClientConnection implements IDataStoreConstants
private void init(int initialSize) private void init(int initialSize)
{ {
_clientAttributes = new ClientAttributes(); _clientAttributes = new ClientAttributes();
_clientAttributes.setAttribute(ClientAttributes.A_ROOT_NAME, _name); _clientAttributes.setAttribute(DataStoreAttributes.A_ROOT_NAME, _name);
_dataStore = new DataStore(_clientAttributes, initialSize); _dataStore = new DataStore(_clientAttributes, initialSize);
_dataStore.setDomainNotifier(_domainNotifier); _dataStore.setDomainNotifier(_domainNotifier);
_dataStore.createRoot(); _dataStore.createRoot();
_host = _clientAttributes.getAttribute(ClientAttributes.A_HOST_NAME); _host = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_NAME);
_hostDirectory = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PATH); _hostDirectory = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PATH);
_port = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PORT); _port = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PORT);
} }
private void flush(DataElement object) private void flush(DataElement object)
@ -831,6 +831,7 @@ public class ClientConnection implements IDataStoreConstants
_dataStore.flush(_dataStore.getDescriptorRoot()); _dataStore.flush(_dataStore.getDescriptorRoot());
_dataStore.createRoot(); _dataStore.createRoot();
} }
private int doHandShake() private int doHandShake()
{ {
try try

View file

@ -53,7 +53,6 @@ import org.eclipse.rse.core.subsystems.CommunicationsEvent;
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher; import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
import org.eclipse.rse.core.subsystems.IServerLauncher; import org.eclipse.rse.core.subsystems.IServerLauncher;
import org.eclipse.rse.core.subsystems.IServerLauncherProperties; import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ServerLaunchType; import org.eclipse.rse.core.subsystems.ServerLaunchType;
import org.eclipse.rse.core.subsystems.SubSystem; import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner; import org.eclipse.rse.dstore.universal.miners.environment.EnvironmentMiner;
@ -72,6 +71,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
import org.osgi.framework.Version; import org.osgi.framework.Version;
/** /**
* System class required by the remote systems framework. * System class required by the remote systems framework.
* This represents the live connection at tool runtime. * This represents the live connection at tool runtime.
@ -493,7 +493,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements
// System.out.println("server launcher is null"); // System.out.println("server launcher is null");
} }
long t1 = System.currentTimeMillis(); //long t1 = System.currentTimeMillis();
SystemMessage msg = null; SystemMessage msg = null;
boolean launchFailed = false; boolean launchFailed = false;
@ -860,13 +860,8 @@ public class DStoreConnectorService extends AbstractConnectorService implements
statusMonitor.waitForUpdate(schemaStatus); statusMonitor.waitForUpdate(schemaStatus);
statusMonitor.waitForUpdate(initStatus); statusMonitor.waitForUpdate(initStatus);
} }
//long t2 = System.currentTimeMillis();
long t2 = System.currentTimeMillis();
//System.out.println("connect time = "+(t2 - t1)); //System.out.println("connect time = "+(t2 - t1));
} }
else else
{ {

View file

@ -436,14 +436,14 @@ public class RexecDstoreServer implements IServerLauncher
// to the client error port. // to the client error port.
// Not sending a port number at this point indicates to the daemon // Not sending a port number at this point indicates to the daemon
// that there is no error socket to establish. // that there is no error socket to establish.
rxOut.writeByte((int) 0); // send null terminator rxOut.writeByte(0); // send null terminator
rxOut.flush(); rxOut.flush();
// send userid and password on rexec socket // send userid and password on rexec socket
rxOut.writeBytes(signonInfo.getUserid()); rxOut.writeBytes(signonInfo.getUserid());
rxOut.writeByte((int) 0); // send null terminator rxOut.writeByte(0); // send null terminator
rxOut.writeBytes(signonInfo.getPassword()); rxOut.writeBytes(signonInfo.getPassword());
rxOut.writeByte((int) 0); // send null terminator rxOut.writeByte(0); // send null terminator
rxOut.flush(); rxOut.flush();
// send the command on rexec socket to start datastore daemon listening // send the command on rexec socket to start datastore daemon listening
@ -458,7 +458,7 @@ public class RexecDstoreServer implements IServerLauncher
SystemBasePlugin.logInfo("RexecDstoreServer :"); SystemBasePlugin.logInfo("RexecDstoreServer :");
rxOut.writeBytes(cmd); rxOut.writeBytes(cmd);
rxOut.writeByte((int) 0); // send null terminator rxOut.writeByte(0); // send null terminator
rxOut.flush(); rxOut.flush();
int inBytes = rxIn.available(); // any data available? int inBytes = rxIn.available(); // any data available?
@ -1146,10 +1146,9 @@ public class RexecDstoreServer implements IServerLauncher
logMessage("Got the port " + port); logMessage("Got the port " + port);
try try
{ {
int possiblePort = Integer.parseInt(port); Integer.parseInt(port);
logMessage("Going to return port " + port); logMessage("Going to return port " + port);
return port; return port;
//logMessage("Return the port " + port);
} }
catch (RuntimeException e) catch (RuntimeException e)
{ {
@ -1166,8 +1165,6 @@ public class RexecDstoreServer implements IServerLauncher
} }
private char convertFromEBCDICToASCII(byte eByte) private char convertFromEBCDICToASCII(byte eByte)
{ {
StringBuffer buf = new StringBuffer();
int index = eByte; int index = eByte;
if (index < 0) if (index < 0)
{ {
@ -1179,7 +1176,7 @@ public class RexecDstoreServer implements IServerLauncher
{ {
int index = eByte; int index = eByte;
for (int i = 0; i <ebcdictounicode.length; i++) { for (int i = 0; i <ebcdictounicode.length; i++) {
if (index ==(int)ebcdictounicode[i]){ if (index == ebcdictounicode[i]){
if (i > 128) if (i > 128)
return (byte )(i - 256); return (byte )(i - 256);
return (byte)i; return (byte)i;

View file

@ -653,8 +653,9 @@ public class PerformanceLogger {
if (isPerformanceLoggingEnabled()) { if (isPerformanceLoggingEnabled()) {
PerformanceLogger.start(); //Start timer using default component PerformanceLogger.start(); //Start timer using default component
} }
for (i = 0; i < 1000000; i++) for (i = 0; i < 1000000; i++) {
; //empty performance test loop
}
if (isPerformanceLoggingEnabled()) { if (isPerformanceLoggingEnabled()) {
PerformanceLogger.stop(); PerformanceLogger.stop();
} }
@ -666,34 +667,41 @@ public class PerformanceLogger {
System.out.println("Product info : " + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_FEATURE, key) + " " System.out.println("Product info : " + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_FEATURE, key) + " "
+ PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_VERSION, key)); + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_VERSION, key));
PerformanceLogger.start(key, "NOT_NESTED_1"); PerformanceLogger.start(key, "NOT_NESTED_1");
for (i = 0; i < 1000000; i++) for (i = 0; i < 1000000; i++) {
; //empty performance test loop
}
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.start(key, "NESTED_ONE"); PerformanceLogger.start(key, "NESTED_ONE");
for (i = 0; i < 500; i++) for (i = 0; i < 500; i++) {
; //empty performance test loop
}
PerformanceLogger.start(key, "NESTED_ONE_CHILD"); PerformanceLogger.start(key, "NESTED_ONE_CHILD");
for (i = 0; i < 300; i++) for (i = 0; i < 300; i++) {
; //empty performance test loop
}
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.start(key, "NOT_NESTED_2"); PerformanceLogger.start(key, "NOT_NESTED_2");
for (i = 0; i < 2000000; i++) for (i = 0; i < 2000000; i++) {
; //empty performance test loop
}
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.start(key, "NESTED_THREE"); PerformanceLogger.start(key, "NESTED_THREE");
for (i = 0; i < 300; i++) for (i = 0; i < 300; i++) {
; //empty performance test loop
}
PerformanceLogger.start(key, "NESTED_TWO_CHILD1"); PerformanceLogger.start(key, "NESTED_TWO_CHILD1");
PerformanceLogger.start(key, "NESTED_TWO_CHILD2"); PerformanceLogger.start(key, "NESTED_TWO_CHILD2");
for (i = 0; i < 4000; i++) for (i = 0; i < 4000; i++) {
; //empty performance test loop
}
PerformanceLogger.start(key, "NESTED_TWO_CHILD3"); PerformanceLogger.start(key, "NESTED_TWO_CHILD3");
for (i = 0; i < 6000; i++) for (i = 0; i < 6000; i++) {
; //empty performance test loop
}
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
@ -701,8 +709,9 @@ public class PerformanceLogger {
PerformanceLogger.start("ABC"); //Expect error: not registered PerformanceLogger.start("ABC"); //Expect error: not registered
PerformanceLogger.start(key); //record timer in the previous registered component PerformanceLogger.start(key); //record timer in the previous registered component
for (i = 0; i < 3000000; i++) for (i = 0; i < 3000000; i++) {
; //empty performance test loop
}
PerformanceLogger.stop(key); PerformanceLogger.stop(key);
key = PerformanceLogger.register(key); // Expect error: already registered key = PerformanceLogger.register(key); // Expect error: already registered
PerformanceLogger.deRegister(key); PerformanceLogger.deRegister(key);