mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[cleanup] Fix compiler warnings
This commit is contained in:
parent
6666e89126
commit
659b31dad8
4 changed files with 41 additions and 39 deletions
|
@ -807,16 +807,16 @@ public class ClientConnection implements IDataStoreConstants
|
|||
private void init(int initialSize)
|
||||
{
|
||||
_clientAttributes = new ClientAttributes();
|
||||
_clientAttributes.setAttribute(ClientAttributes.A_ROOT_NAME, _name);
|
||||
_clientAttributes.setAttribute(DataStoreAttributes.A_ROOT_NAME, _name);
|
||||
|
||||
|
||||
_dataStore = new DataStore(_clientAttributes, initialSize);
|
||||
_dataStore.setDomainNotifier(_domainNotifier);
|
||||
_dataStore.createRoot();
|
||||
|
||||
_host = _clientAttributes.getAttribute(ClientAttributes.A_HOST_NAME);
|
||||
_hostDirectory = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PATH);
|
||||
_port = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PORT);
|
||||
_host = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_NAME);
|
||||
_hostDirectory = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PATH);
|
||||
_port = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PORT);
|
||||
}
|
||||
|
||||
private void flush(DataElement object)
|
||||
|
@ -831,6 +831,7 @@ public class ClientConnection implements IDataStoreConstants
|
|||
_dataStore.flush(_dataStore.getDescriptorRoot());
|
||||
_dataStore.createRoot();
|
||||
}
|
||||
|
||||
private int doHandShake()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -53,7 +53,6 @@ import org.eclipse.rse.core.subsystems.CommunicationsEvent;
|
|||
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
|
||||
import org.eclipse.rse.core.subsystems.IServerLauncher;
|
||||
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.SubSystem;
|
||||
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.osgi.framework.Bundle;
|
||||
import org.osgi.framework.Version;
|
||||
|
||||
/**
|
||||
* System class required by the remote systems framework.
|
||||
* 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");
|
||||
}
|
||||
|
||||
long t1 = System.currentTimeMillis();
|
||||
//long t1 = System.currentTimeMillis();
|
||||
SystemMessage msg = null;
|
||||
boolean launchFailed = false;
|
||||
|
||||
|
@ -860,13 +860,8 @@ public class DStoreConnectorService extends AbstractConnectorService implements
|
|||
statusMonitor.waitForUpdate(schemaStatus);
|
||||
statusMonitor.waitForUpdate(initStatus);
|
||||
}
|
||||
|
||||
long t2 = System.currentTimeMillis();
|
||||
|
||||
//long t2 = System.currentTimeMillis();
|
||||
//System.out.println("connect time = "+(t2 - t1));
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -436,14 +436,14 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
// to the client error port.
|
||||
// Not sending a port number at this point indicates to the daemon
|
||||
// that there is no error socket to establish.
|
||||
rxOut.writeByte((int) 0); // send null terminator
|
||||
rxOut.writeByte(0); // send null terminator
|
||||
rxOut.flush();
|
||||
|
||||
// send userid and password on rexec socket
|
||||
rxOut.writeBytes(signonInfo.getUserid());
|
||||
rxOut.writeByte((int) 0); // send null terminator
|
||||
rxOut.writeByte(0); // send null terminator
|
||||
rxOut.writeBytes(signonInfo.getPassword());
|
||||
rxOut.writeByte((int) 0); // send null terminator
|
||||
rxOut.writeByte(0); // send null terminator
|
||||
rxOut.flush();
|
||||
|
||||
// send the command on rexec socket to start datastore daemon listening
|
||||
|
@ -458,7 +458,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
SystemBasePlugin.logInfo("RexecDstoreServer :");
|
||||
|
||||
rxOut.writeBytes(cmd);
|
||||
rxOut.writeByte((int) 0); // send null terminator
|
||||
rxOut.writeByte(0); // send null terminator
|
||||
rxOut.flush();
|
||||
|
||||
int inBytes = rxIn.available(); // any data available?
|
||||
|
@ -1146,10 +1146,9 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
logMessage("Got the port " + port);
|
||||
try
|
||||
{
|
||||
int possiblePort = Integer.parseInt(port);
|
||||
Integer.parseInt(port);
|
||||
logMessage("Going to return port " + port);
|
||||
return port;
|
||||
//logMessage("Return the port " + port);
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
|
@ -1166,8 +1165,6 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
}
|
||||
private char convertFromEBCDICToASCII(byte eByte)
|
||||
{
|
||||
|
||||
StringBuffer buf = new StringBuffer();
|
||||
int index = eByte;
|
||||
if (index < 0)
|
||||
{
|
||||
|
@ -1179,7 +1176,7 @@ public class RexecDstoreServer implements IServerLauncher
|
|||
{
|
||||
int index = eByte;
|
||||
for (int i = 0; i <ebcdictounicode.length; i++) {
|
||||
if (index ==(int)ebcdictounicode[i]){
|
||||
if (index == ebcdictounicode[i]){
|
||||
if (i > 128)
|
||||
return (byte )(i - 256);
|
||||
return (byte)i;
|
||||
|
|
|
@ -653,8 +653,9 @@ public class PerformanceLogger {
|
|||
if (isPerformanceLoggingEnabled()) {
|
||||
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()) {
|
||||
PerformanceLogger.stop();
|
||||
}
|
||||
|
@ -666,34 +667,41 @@ public class PerformanceLogger {
|
|||
System.out.println("Product info : " + PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_FEATURE, key) + " "
|
||||
+ PerformanceLogger.getCurrentProductInfo(PerformanceLogger.OPTION_GET_VERSION, key));
|
||||
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.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");
|
||||
for (i = 0; i < 300; i++)
|
||||
;
|
||||
for (i = 0; i < 300; i++) {
|
||||
//empty performance test loop
|
||||
}
|
||||
PerformanceLogger.stop(key);
|
||||
PerformanceLogger.stop(key);
|
||||
|
||||
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.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_CHILD2");
|
||||
for (i = 0; i < 4000; i++)
|
||||
;
|
||||
for (i = 0; i < 4000; i++) {
|
||||
//empty performance test loop
|
||||
}
|
||||
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);
|
||||
|
@ -701,8 +709,9 @@ public class PerformanceLogger {
|
|||
|
||||
PerformanceLogger.start("ABC"); //Expect error: not registered
|
||||
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);
|
||||
key = PerformanceLogger.register(key); // Expect error: already registered
|
||||
PerformanceLogger.deRegister(key);
|
||||
|
|
Loading…
Add table
Reference in a new issue