summaryrefslogtreecommitdiffstats
path: root/vm/jdwp
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2010-05-20 22:54:18 -0700
committerCarl Shapiro <cshapiro@google.com>2010-05-21 16:17:32 -0700
commite3c01dac83e6eea7f82fe81ed89cfbdd9791dbc9 (patch)
tree5ac4bca0a836db33243aeb22ba5d49aadcba2d58 /vm/jdwp
parent2b908f67d0150c11057497f0dc551e3369105184 (diff)
downloadandroid_dalvik-e3c01dac83e6eea7f82fe81ed89cfbdd9791dbc9.tar.gz
android_dalvik-e3c01dac83e6eea7f82fe81ed89cfbdd9791dbc9.tar.bz2
android_dalvik-e3c01dac83e6eea7f82fe81ed89cfbdd9791dbc9.zip
Remove unused labels, variables, and functions. Enable warnings.
Change-Id: Icbe24eaf1ad499f28b68b6a5f05368271a0a7e86
Diffstat (limited to 'vm/jdwp')
-rw-r--r--vm/jdwp/JdwpEvent.c3
-rw-r--r--vm/jdwp/JdwpHandler.c11
-rw-r--r--vm/jdwp/JdwpMain.c3
-rw-r--r--vm/jdwp/JdwpSocket.c10
4 files changed, 7 insertions, 20 deletions
diff --git a/vm/jdwp/JdwpEvent.c b/vm/jdwp/JdwpEvent.c
index 996d7ad5a..903759907 100644
--- a/vm/jdwp/JdwpEvent.c
+++ b/vm/jdwp/JdwpEvent.c
@@ -206,7 +206,6 @@ JdwpError dvmJdwpRegisterEvent(JdwpState* state, JdwpEvent* pEvent)
state->eventList = pEvent;
state->numEvents++;
-bail:
unlockEventMutex(state);
return err;
@@ -425,8 +424,6 @@ static bool patternMatch(const char* pattern, const char* target)
return false;
return strcmp(pattern+1, target + (targetLen-patLen)) == 0;
} else if (pattern[patLen-1] == '*') {
- int i;
-
return strncmp(pattern, target, patLen-1) == 0;
} else {
return strcmp(pattern, target) == 0;
diff --git a/vm/jdwp/JdwpHandler.c b/vm/jdwp/JdwpHandler.c
index 53b5d260a..06d76edcf 100644
--- a/vm/jdwp/JdwpHandler.c
+++ b/vm/jdwp/JdwpHandler.c
@@ -240,7 +240,6 @@ static JdwpError handleVM_ClassesBySignature(JdwpState* state,
u4 numClasses;
size_t strLen;
RefTypeId refTypeId;
- int i;
classDescriptor = readNewUtf8String(&buf, &strLen);
LOGV(" Req for class by signature '%s'\n", classDescriptor);
@@ -430,8 +429,6 @@ static JdwpError handleVM_CreateString(JdwpState* state,
static JdwpError handleVM_Capabilities(JdwpState* state,
const u1* buf, int dataLen, ExpandBuf* pReply)
{
- int i;
-
expandBufAdd1(pReply, false); /* canWatchFieldModification */
expandBufAdd1(pReply, false); /* canWatchFieldAccess */
expandBufAdd1(pReply, false); /* canGetBytecodes */
@@ -745,7 +742,6 @@ static JdwpError handleRT_ClassLoader(JdwpState* state,
const u1* buf, int dataLen, ExpandBuf* pReply)
{
RefTypeId refTypeId;
- ObjectId classLoaderId;
refTypeId = dvmReadRefTypeId(&buf);
@@ -762,7 +758,6 @@ static JdwpError handleRT_FieldsWithGeneric(JdwpState* state,
const u1* buf, int dataLen, ExpandBuf* pReply)
{
RefTypeId refTypeId;
- int i, numFields;
refTypeId = dvmReadRefTypeId(&buf);
LOGV(" Req for fields in refTypeId=0x%llx\n", refTypeId);
@@ -785,7 +780,6 @@ static JdwpError handleRT_MethodsWithGeneric(JdwpState* state,
const u1* buf, int dataLen, ExpandBuf* pReply)
{
RefTypeId refTypeId;
- int i;
refTypeId = dvmReadRefTypeId(&buf);
@@ -887,7 +881,6 @@ static JdwpError handleCT_NewInstance(JdwpState* state,
ObjectId threadId;
MethodId methodId;
ObjectId objectId;
- u4 numArgs;
classId = dvmReadRefTypeId(&buf);
threadId = dvmReadObjectId(&buf);
@@ -997,7 +990,6 @@ static JdwpError handleOR_GetValues(JdwpState* state,
u1 fieldTag;
int width;
u1* ptr;
- const char* fieldName;
fieldId = dvmReadFieldId(&buf);
@@ -1420,7 +1412,6 @@ static JdwpError handleTGR_Children(JdwpState* state,
{
ObjectId threadGroupId;
u4 threadCount;
- ObjectId threadId;
ObjectId* pThreadIds;
ObjectId* walker;
int i;
@@ -1510,8 +1501,6 @@ static JdwpError handleAR_SetValues(JdwpState* state,
ObjectId arrayId;
u4 firstIndex;
u4 values;
- u1 tag;
- int i;
arrayId = dvmReadObjectId(&buf);
firstIndex = read4BE(&buf);
diff --git a/vm/jdwp/JdwpMain.c b/vm/jdwp/JdwpMain.c
index ef2461835..015f1c678 100644
--- a/vm/jdwp/JdwpMain.c
+++ b/vm/jdwp/JdwpMain.c
@@ -40,8 +40,6 @@ static void* jdwpThreadStart(void* arg);
JdwpState* dvmJdwpStartup(const JdwpStartupParams* pParams)
{
JdwpState* state = NULL;
- int i, sleepIter;
- u8 startWhen;
/* comment this out when debugging JDWP itself */
android_setMinPriority(LOG_TAG, ANDROID_LOG_DEBUG);
@@ -253,7 +251,6 @@ static void* jdwpThreadStart(void* arg)
*/
while (state->run) {
bool first;
- int cc;
if (state->params.server) {
/*
diff --git a/vm/jdwp/JdwpSocket.c b/vm/jdwp/JdwpSocket.c
index 42cd1897e..f5eebca74 100644
--- a/vm/jdwp/JdwpSocket.c
+++ b/vm/jdwp/JdwpSocket.c
@@ -270,6 +270,7 @@ static bool isConnected(JdwpState* state)
/*
* Returns "true" if the fd is ready, "false" if not.
*/
+#if 0
static bool isFdReadable(int sock)
{
fd_set readfds;
@@ -291,6 +292,7 @@ static bool isFdReadable(int sock)
LOGE("WEIRD: odd behavior in select (count=%d)\n", count);
return false;
}
+#endif
#if 0
/*
@@ -390,8 +392,7 @@ static bool establishConnection(JdwpState* state)
struct sockaddr addrPlain;
} addr;
struct hostent* pEntry;
- char auxBuf[128];
- int cc, h_errno;
+ int h_errno;
assert(state != NULL && state->netState != NULL);
assert(!state->params.server);
@@ -405,7 +406,8 @@ static bool establishConnection(JdwpState* state)
//#warning "forcing non-R"
#ifdef HAVE_GETHOSTBYNAME_R
struct hostent he;
- cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf),
+ char auxBuf[128];
+ int cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf),
&pEntry, &h_errno);
if (cc != 0) {
LOGW("gethostbyname_r('%s') failed: %s\n",
@@ -536,6 +538,7 @@ static void consumeBytes(JdwpNetState* netState, int count)
/*
* Dump the contents of a packet to stdout.
*/
+#if 0
static void dumpPacket(const unsigned char* packetBuf)
{
const unsigned char* buf = packetBuf;
@@ -567,6 +570,7 @@ static void dumpPacket(const unsigned char* packetBuf)
if (dataLen > 0)
dvmPrintHexDumpDbg(buf, dataLen, LOG_TAG);
}
+#endif
/*
* Handle a packet. Returns "false" if we encounter a connection-fatal error.