Remove unneeded void argument list declarations.
Change-Id: Ica749f6defa890363ec531b29e25bc415dc2cbb9
diff --git a/vm/AllocTracker.cpp b/vm/AllocTracker.cpp
index c65ac4d..156fb86 100644
--- a/vm/AllocTracker.cpp
+++ b/vm/AllocTracker.cpp
@@ -73,7 +73,7 @@
* Initialize a few things. This gets called early, so keep activity to
* a minimum.
*/
-bool dvmAllocTrackerStartup(void)
+bool dvmAllocTrackerStartup()
{
/* prep locks */
dvmInitMutex(&gDvm.allocTrackerLock);
@@ -87,7 +87,7 @@
/*
* Release anything we're holding on to.
*/
-void dvmAllocTrackerShutdown(void)
+void dvmAllocTrackerShutdown()
{
free(gDvm.allocRecords);
dvmDestroyMutex(&gDvm.allocTrackerLock);
@@ -105,7 +105,7 @@
*
* Returns "true" on success.
*/
-bool dvmEnableAllocTracker(void)
+bool dvmEnableAllocTracker()
{
bool result = true;
dvmLockMutex(&gDvm.allocTrackerLock);
@@ -129,7 +129,7 @@
/*
* Disable allocation tracking. Does nothing if tracking is not enabled.
*/
-void dvmDisableAllocTracker(void)
+void dvmDisableAllocTracker()
{
dvmLockMutex(&gDvm.allocTrackerLock);
@@ -278,7 +278,7 @@
* We need to handle underflow in our circular buffer, so we add
* kNumAllocRecords and then mask it back down.
*/
-inline static int headIndex(void)
+inline static int headIndex()
{
return (gDvm.allocRecordHead+1 + kNumAllocRecords - gDvm.allocRecordCount)
& (kNumAllocRecords-1);
diff --git a/vm/Ddm.cpp b/vm/Ddm.cpp
index 23561fd..4bb2bb1 100644
--- a/vm/Ddm.cpp
+++ b/vm/Ddm.cpp
@@ -192,7 +192,7 @@
*
* We can do some initialization here too.
*/
-void dvmDdmConnected(void)
+void dvmDdmConnected()
{
// TODO: any init
@@ -205,7 +205,7 @@
*
* Do some cleanup.
*/
-void dvmDdmDisconnected(void)
+void dvmDdmDisconnected()
{
LOGV("Broadcasting DDM disconnect\n");
broadcast(DISCONNECTED);
@@ -351,7 +351,7 @@
* Returns a new byte[] with the data inside, or NULL on failure. The
* caller must call dvmReleaseTrackedAlloc() on the array.
*/
-ArrayObject* dvmDdmGenerateThreadStats(void)
+ArrayObject* dvmDdmGenerateThreadStats()
{
const int kHeaderLen = 4;
const int kBytesPerEntry = 18;
@@ -462,7 +462,7 @@
*
* Returns NULL on failure with an exception raised.
*/
-ArrayObject* dvmDdmGetRecentAllocations(void)
+ArrayObject* dvmDdmGetRecentAllocations()
{
u1* data;
size_t len;
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index ebe4149..478644b 100644
--- a/vm/Debugger.cpp
+++ b/vm/Debugger.cpp
@@ -95,7 +95,7 @@
* System init. We don't allocate the registry until first use.
* Make sure we do this before initializing JDWP.
*/
-bool dvmDebuggerStartup(void)
+bool dvmDebuggerStartup()
{
if (!dvmBreakpointStartup())
return false;
@@ -107,7 +107,7 @@
/*
* Free registry storage.
*/
-void dvmDebuggerShutdown(void)
+void dvmDebuggerShutdown()
{
dvmHashTableFree(gDvm.dbgRegistry);
gDvm.dbgRegistry = NULL;
@@ -229,7 +229,7 @@
goto bail;
}
- (void) dvmHashTableLookup(gDvm.dbgRegistry, registryHash((u4) id),
+ dvmHashTableLookup(gDvm.dbgRegistry, registryHash((u4) id),
(void*)(u4) id, registryCompare, true);
bail:
@@ -364,7 +364,7 @@
/*
* Get the invocation request state.
*/
-DebugInvokeReq* dvmDbgGetInvokeReq(void)
+DebugInvokeReq* dvmDbgGetInvokeReq()
{
return &dvmThreadSelf()->invokeReq;
}
@@ -374,7 +374,7 @@
*
* Only called from the JDWP handler thread.
*/
-void dvmDbgConnected(void)
+void dvmDbgConnected()
{
assert(!gDvm.debuggerConnected);
@@ -390,7 +390,7 @@
*
* Only called from the JDWP handler thread.
*/
-void dvmDbgActive(void)
+void dvmDbgActive()
{
if (gDvm.debuggerActive)
return;
@@ -412,7 +412,7 @@
*
* Only called from the JDWP handler thread.
*/
-void dvmDbgDisconnected(void)
+void dvmDbgDisconnected()
{
assert(gDvm.debuggerConnected);
@@ -440,7 +440,7 @@
*
* Does not return "true" if it's just a DDM server.
*/
-bool dvmDbgIsDebuggerConnected(void)
+bool dvmDbgIsDebuggerConnected()
{
return gDvm.debuggerActive;
}
@@ -449,7 +449,7 @@
* Get time since last debugger activity. Used when figuring out if the
* debugger has finished configuring us.
*/
-s8 dvmDbgLastDebuggerActivity(void)
+s8 dvmDbgLastDebuggerActivity()
{
return dvmJdwpLastDebuggerActivity(gDvm.jdwpState);
}
@@ -457,7 +457,7 @@
/*
* JDWP thread is running, don't allow GC.
*/
-int dvmDbgThreadRunning(void)
+int dvmDbgThreadRunning()
{
ThreadStatus oldStatus = dvmChangeStatus(NULL, THREAD_RUNNING);
return static_cast<int>(oldStatus);
@@ -466,7 +466,7 @@
/*
* JDWP thread is idle, allow GC.
*/
-int dvmDbgThreadWaiting(void)
+int dvmDbgThreadWaiting()
{
ThreadStatus oldStatus = dvmChangeStatus(NULL, THREAD_VMWAIT);
return static_cast<int>(oldStatus);
@@ -1857,7 +1857,7 @@
/*
* Return the ObjectId for the "system" thread group.
*/
-ObjectId dvmDbgGetSystemThreadGroupId(void)
+ObjectId dvmDbgGetSystemThreadGroupId()
{
Object* groupObj = dvmGetSystemThreadGroup();
return objectToObjectId(groupObj);
@@ -1866,7 +1866,7 @@
/*
* Return the ObjectId for the "main" thread group.
*/
-ObjectId dvmDbgGetMainThreadGroupId(void)
+ObjectId dvmDbgGetMainThreadGroupId()
{
Object* groupObj = dvmGetMainThreadGroup();
return objectToObjectId(groupObj);
@@ -2136,7 +2136,7 @@
/*
* Get the ThreadId for the current thread.
*/
-ObjectId dvmDbgGetThreadSelfId(void)
+ObjectId dvmDbgGetThreadSelfId()
{
Thread* self = dvmThreadSelf();
return objectToObjectId(self->threadObj);
@@ -2202,7 +2202,7 @@
/*
* Suspend ourselves after sending an event to the debugger.
*/
-void dvmDbgSuspendSelf(void)
+void dvmDbgSuspendSelf()
{
dvmSuspendSelf(true);
}
@@ -2847,7 +2847,7 @@
* We can't use the "tracked allocation" mechanism here because
* the object is going to be handed off to a different thread.
*/
- (void) objectToObjectId((Object*)pReq->resultValue.l);
+ objectToObjectId((Object*)pReq->resultValue.l);
}
if (oldExcept != NULL) {
@@ -2945,7 +2945,7 @@
/*
* First DDM packet has arrived over JDWP. Notify the press.
*/
-void dvmDbgDdmConnected(void)
+void dvmDbgDdmConnected()
{
dvmDdmConnected();
}
@@ -2953,7 +2953,7 @@
/*
* JDWP connection has dropped.
*/
-void dvmDbgDdmDisconnected(void)
+void dvmDbgDdmDisconnected()
{
dvmDdmDisconnected();
}
diff --git a/vm/Exception.cpp b/vm/Exception.cpp
index 0e25426..7bf824f 100644
--- a/vm/Exception.cpp
+++ b/vm/Exception.cpp
@@ -561,7 +561,7 @@
* Exceptions thrown during the course of printing the stack trace are
* ignored.
*/
-void dvmPrintExceptionStackTrace(void)
+void dvmPrintExceptionStackTrace()
{
Thread* self = dvmThreadSelf();
Object* exception;
@@ -1195,7 +1195,7 @@
* the stored stack trace and process it internally instead of calling
* interpreted code.
*/
-void dvmLogExceptionStackTrace(void)
+void dvmLogExceptionStackTrace()
{
Object* exception = dvmThreadSelf()->exception;
Object* cause;
@@ -1312,7 +1312,7 @@
dvmThrowChainedException(gDvm.exClassNotFoundException, name, cause);
}
-void dvmThrowExceptionInInitializerError(void)
+void dvmThrowExceptionInInitializerError()
{
/*
* TODO: Do we want to wrap it if the original is an Error rather than
diff --git a/vm/Init.cpp b/vm/Init.cpp
index 9019157..629a50a 100644
--- a/vm/Init.cpp
+++ b/vm/Init.cpp
@@ -42,8 +42,8 @@
/* fwd */
static bool registerSystemNatives(JNIEnv* pEnv);
-static bool initJdwp(void);
-static bool initZygote(void);
+static bool initJdwp();
+static bool initZygote();
/* global state */
@@ -190,7 +190,7 @@
/*
* Show helpful information on JDWP options.
*/
-static void showJdwpHelp(void)
+static void showJdwpHelp()
{
dvmFprintf(stderr,
"Example: -Xrunjdwp:transport=dt_socket,address=8000,server=y\n");
@@ -201,7 +201,7 @@
/*
* Show version and copyright info.
*/
-static void showVersion(void)
+static void showVersion()
{
dvmFprintf(stdout, "DalvikVM version %d.%d.%d\n",
DALVIK_MAJOR_VERSION, DALVIK_MINOR_VERSION, DALVIK_BUG_VERSION);
@@ -517,7 +517,7 @@
*
* This must only be called from the main thread during zygote init.
*/
-void dvmLateEnableAssertions(void)
+void dvmLateEnableAssertions()
{
if (gDvm.assertionCtrl == NULL) {
LOGD("Not late-enabling assertions: no assertionCtrl array\n");
@@ -541,7 +541,7 @@
/*
* Release memory associated with the AssertionCtrl array.
*/
-static void freeAssertionCtrl(void)
+static void freeAssertionCtrl()
{
int i;
@@ -1388,7 +1388,7 @@
/*
* Do zygote-mode-only initialization.
*/
-static bool initZygote(void)
+static bool initZygote()
{
/* zygote goes into its own process group */
setpgid(0,0);
@@ -1400,7 +1400,7 @@
* Do non-zygote-mode initialization. This is done during VM init for
* standard startup, or after a "zygote fork" when creating a new process.
*/
-bool dvmInitAfterZygote(void)
+bool dvmInitAfterZygote()
{
u8 startHeap, startQuit, startJdwp;
u8 endHeap, endQuit, endJdwp;
@@ -1476,7 +1476,7 @@
*
* This gets more complicated with a nonzero value for "timeout".
*/
-static bool initJdwp(void)
+static bool initJdwp()
{
assert(!gDvm.zygote);
@@ -1614,7 +1614,7 @@
* same thread that started the VM, a/k/a the main thread, but we don't
* want to assume that.)
*/
-void dvmShutdown(void)
+void dvmShutdown()
{
LOGV("VM shutting down\n");
@@ -1720,7 +1720,7 @@
*
* TODO: move this into libs/cutils and make it work for all platforms.
*/
-void dvmPrintNativeBackTrace(void)
+void dvmPrintNativeBackTrace()
{
size_t MAX_STACK_FRAMES = 64;
void* stackFrames[MAX_STACK_FRAMES];
@@ -1743,7 +1743,7 @@
free(strings);
}
#else
-void dvmPrintNativeBackTrace(void) {
+void dvmPrintNativeBackTrace() {
/* Hopefully, you're on an Android device and debuggerd will do this. */
}
#endif
@@ -1752,7 +1752,7 @@
* Abort the VM. We get here on fatal errors. Try very hard not to use
* this; whenever possible, return an error to somebody responsible.
*/
-void dvmAbort(void)
+void dvmAbort()
{
LOGE("VM aborting\n");
diff --git a/vm/InitRefs.cpp b/vm/InitRefs.cpp
index 5c832bf..2b99850 100644
--- a/vm/InitRefs.cpp
+++ b/vm/InitRefs.cpp
@@ -41,7 +41,7 @@
return true;
}
-static bool initClassReferences(void) {
+static bool initClassReferences() {
static struct { ClassObject** ref; const char* name; } classes[] = {
/*
* Note: The class Class gets special treatment during initial
@@ -164,7 +164,7 @@
return true;
}
-static bool initFieldOffsets(void) {
+static bool initFieldOffsets() {
struct FieldInfo {
int* offset;
const char* name;
@@ -320,7 +320,7 @@
return initDirectMethodReferenceByClass(pMethod, clazz, name, descriptor);
}
-static bool initConstructorReferences(void) {
+static bool initConstructorReferences() {
static struct { Method** method; const char* name; const char* descriptor; } constructors[] = {
{ &gDvm.methJavaLangStackTraceElement_init, "Ljava/lang/StackTraceElement;",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V" },
@@ -350,7 +350,7 @@
return true;
}
-static bool initDirectMethodReferences(void) {
+static bool initDirectMethodReferences() {
static struct {
Method** method;
const char* className;
@@ -412,7 +412,7 @@
return true;
}
-static bool initVirtualMethodOffsets(void) {
+static bool initVirtualMethodOffsets() {
static struct {
int* offset;
const char* className;
@@ -459,7 +459,7 @@
return true;
}
-static bool verifyStringOffsets(void) {
+static bool verifyStringOffsets() {
/*
* Various parts of the system use predefined constants for the
* offsets to a few fields of the class String. This code verifies
@@ -478,7 +478,7 @@
}
/* (documented in header) */
-bool dvmFindRequiredClassesAndMembers(void) {
+bool dvmFindRequiredClassesAndMembers() {
/*
* Note: Under normal VM use, this is called by dvmStartup()
* in Init.c. For dex optimization, this is called as well, but in
diff --git a/vm/InlineNative.cpp b/vm/InlineNative.cpp
index cd978aa..8e538cc 100644
--- a/vm/InlineNative.cpp
+++ b/vm/InlineNative.cpp
@@ -780,7 +780,7 @@
/*
* Allocate some tables.
*/
-bool dvmInlineNativeStartup(void)
+bool dvmInlineNativeStartup()
{
gDvm.inlinedMethods =
(Method**) calloc(NELEM(gDvmInlineOpsTable), sizeof(Method*));
@@ -793,7 +793,7 @@
/*
* Free generated tables.
*/
-void dvmInlineNativeShutdown(void)
+void dvmInlineNativeShutdown()
{
free(gDvm.inlinedMethods);
}
@@ -802,7 +802,7 @@
/*
* Get a pointer to the inlineops table.
*/
-const InlineOperation* dvmGetInlineOpsTable(void)
+const InlineOperation* dvmGetInlineOpsTable()
{
return gDvmInlineOpsTable;
}
@@ -810,7 +810,7 @@
/*
* Get the number of entries in the inlineops table.
*/
-int dvmGetInlineOpsTableLength(void)
+int dvmGetInlineOpsTableLength()
{
return NELEM(gDvmInlineOpsTable);
}
diff --git a/vm/Intern.cpp b/vm/Intern.cpp
index 8f84528..8215107 100644
--- a/vm/Intern.cpp
+++ b/vm/Intern.cpp
@@ -23,7 +23,7 @@
/*
* Prep string interning.
*/
-bool dvmStringInternStartup(void)
+bool dvmStringInternStartup()
{
dvmInitMutex(&gDvm.internLock);
gDvm.internedStrings = dvmHashTableCreate(256, NULL);
@@ -40,7 +40,7 @@
*
* The contents of the list are StringObjects that live on the GC heap.
*/
-void dvmStringInternShutdown(void)
+void dvmStringInternShutdown()
{
if (gDvm.internedStrings != NULL || gDvm.literalStrings != NULL) {
dvmDestroyMutex(&gDvm.internLock);
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index 2c3926c..5412c75 100644
--- a/vm/Misc.cpp
+++ b/vm/Misc.cpp
@@ -410,7 +410,7 @@
* computing durations (e.g. "operation X took 52nsec"), so the result
* should not be used to get the current date/time.
*/
-u8 dvmGetRelativeTimeNsec(void)
+u8 dvmGetRelativeTimeNsec()
{
#ifdef HAVE_POSIX_CLOCKS
struct timespec now;
@@ -428,7 +428,7 @@
*
* Only useful for time deltas.
*/
-u8 dvmGetThreadCpuTimeNsec(void)
+u8 dvmGetThreadCpuTimeNsec()
{
#ifdef HAVE_POSIX_CLOCKS
struct timespec now;
diff --git a/vm/Native.cpp b/vm/Native.cpp
index 58963f5..7ff22b8 100644
--- a/vm/Native.cpp
+++ b/vm/Native.cpp
@@ -33,7 +33,7 @@
/*
* Initialize the native code loader.
*/
-bool dvmNativeStartup(void)
+bool dvmNativeStartup()
{
gDvm.nativeLibs = dvmHashTableCreate(4, freeSharedLibEntry);
if (gDvm.nativeLibs == NULL)
@@ -45,7 +45,7 @@
/*
* Free up our tables.
*/
-void dvmNativeShutdown(void)
+void dvmNativeShutdown()
{
dvmHashTableFree(gDvm.nativeLibs);
gDvm.nativeLibs = NULL;
diff --git a/vm/Profile.cpp b/vm/Profile.cpp
index 6faf726..b1f57f5 100644
--- a/vm/Profile.cpp
+++ b/vm/Profile.cpp
@@ -137,7 +137,7 @@
/*
* Boot-time init.
*/
-bool dvmProfilingStartup(void)
+bool dvmProfilingStartup()
{
/*
* Initialize "dmtrace" method profiling.
@@ -189,7 +189,7 @@
/*
* Free up profiling resources.
*/
-void dvmProfilingShutdown(void)
+void dvmProfilingShutdown()
{
#ifdef UPDATE_MAGIC_PAGE
if (gDvm.emulatorTracePage != NULL)
@@ -231,7 +231,7 @@
/*
* Reset the "cpuClockBase" field in all threads.
*/
-static void resetCpuClockBase(void)
+static void resetCpuClockBase()
{
Thread* thread;
@@ -453,7 +453,7 @@
* This value is going to vary depending on what else is going on in the
* system. When examined across several runs a pattern should emerge.
*/
-static u4 getClockOverhead(void)
+static u4 getClockOverhead()
{
u8 calStart, calElapsed;
int i;
@@ -477,7 +477,7 @@
/*
* Returns "true" if method tracing is currently active.
*/
-bool dvmIsMethodTraceActive(void)
+bool dvmIsMethodTraceActive()
{
const MethodTraceState* state = &gDvm.methodTrace;
return state->traceEnabled;
@@ -487,7 +487,7 @@
* Stop method tracing. We write the buffer to disk and generate a key
* file so we can interpret it.
*/
-void dvmMethodTraceStop(void)
+void dvmMethodTraceStop()
{
MethodTraceState* state = &gDvm.methodTrace;
u8 elapsed;
@@ -831,11 +831,11 @@
* The GC calls this when it's about to start. We add a marker to the
* trace output so the tool can exclude the GC cost from the results.
*/
-void dvmMethodTraceGCBegin(void)
+void dvmMethodTraceGCBegin()
{
TRACE_METHOD_ENTER(dvmThreadSelf(), gDvm.methodTraceGcMethod);
}
-void dvmMethodTraceGCEnd(void)
+void dvmMethodTraceGCEnd()
{
TRACE_METHOD_EXIT(dvmThreadSelf(), gDvm.methodTraceGcMethod);
}
@@ -843,11 +843,11 @@
/*
* The class loader calls this when it's loading or initializing a class.
*/
-void dvmMethodTraceClassPrepBegin(void)
+void dvmMethodTraceClassPrepBegin()
{
TRACE_METHOD_ENTER(dvmThreadSelf(), gDvm.methodTraceClassPrepMethod);
}
-void dvmMethodTraceClassPrepEnd(void)
+void dvmMethodTraceClassPrepEnd()
{
TRACE_METHOD_EXIT(dvmThreadSelf(), gDvm.methodTraceClassPrepMethod);
}
@@ -856,7 +856,7 @@
/*
* Enable emulator trace info.
*/
-void dvmEmulatorTraceStart(void)
+void dvmEmulatorTraceStart()
{
/* If we could not map the emulator trace page, then do not enable tracing */
if (gDvm.emulatorTracePage == NULL)
@@ -873,7 +873,7 @@
/*
* Disable emulator trace info.
*/
-void dvmEmulatorTraceStop(void)
+void dvmEmulatorTraceStop()
{
if (gDvm.emulatorTraceEnableCount == 0) {
LOGE("ERROR: emulator tracing not enabled\n");
@@ -891,7 +891,7 @@
/*
* Start instruction counting.
*/
-void dvmStartInstructionCounting(void)
+void dvmStartInstructionCounting()
{
/* in theory we should make this an atomic inc; in practice not important */
gDvm.instructionCountEnableCount++;
@@ -901,7 +901,7 @@
/*
* Stop instruction counting.
*/
-void dvmStopInstructionCounting(void)
+void dvmStopInstructionCounting()
{
if (gDvm.instructionCountEnableCount == 0) {
LOGE("ERROR: instruction counting not enabled\n");
@@ -917,7 +917,7 @@
* Start alloc counting. Note this doesn't affect the "active profilers"
* count, since the interpreter loop is not involved.
*/
-void dvmStartAllocCounting(void)
+void dvmStartAllocCounting()
{
gDvm.allocProf.enabled = true;
}
@@ -925,7 +925,7 @@
/*
* Stop alloc counting.
*/
-void dvmStopAllocCounting(void)
+void dvmStopAllocCounting()
{
gDvm.allocProf.enabled = false;
}
diff --git a/vm/Properties.cpp b/vm/Properties.cpp
index 00d4b07..62d45db 100644
--- a/vm/Properties.cpp
+++ b/vm/Properties.cpp
@@ -21,7 +21,7 @@
#include <cutils/array.h>
#include <stdlib.h>
-bool dvmPropertiesStartup(void)
+bool dvmPropertiesStartup()
{
gDvm.properties = arrayCreate();
if (gDvm.properties == NULL) {
@@ -30,7 +30,7 @@
return true;
}
-void dvmPropertiesShutdown(void)
+void dvmPropertiesShutdown()
{
size_t size = arraySize(gDvm.properties);
size_t i;
diff --git a/vm/SignalCatcher.cpp b/vm/SignalCatcher.cpp
index a8fc59d..a24764a 100644
--- a/vm/SignalCatcher.cpp
+++ b/vm/SignalCatcher.cpp
@@ -39,7 +39,7 @@
*
* Returns immediately.
*/
-bool dvmSignalCatcherStartup(void)
+bool dvmSignalCatcherStartup()
{
gDvm.haltSignalCatcher = false;
@@ -56,7 +56,7 @@
* Since we know the thread is just sitting around waiting for signals
* to arrive, send it one.
*/
-void dvmSignalCatcherShutdown(void)
+void dvmSignalCatcherShutdown()
{
gDvm.haltSignalCatcher = true;
if (gDvm.signalCatcherHandle == 0) // not started yet
@@ -138,7 +138,7 @@
*
* If JIT tuning is compiled in, dump compiler stats as well.
*/
-static void handleSigQuit(void)
+static void handleSigQuit()
{
char* traceBuf = NULL;
size_t traceLen;
@@ -208,7 +208,7 @@
/*
* Respond to a SIGUSR1 by forcing a GC.
*/
-static void handleSigUsr1(void)
+static void handleSigUsr1()
{
LOGI("SIGUSR1 forcing GC (no HPROF)\n");
dvmCollectGarbage();
@@ -227,7 +227,7 @@
* Respond to a SIGUSR2 by dumping some JIT stats and possibly resetting
* the code cache.
*/
-static void handleSigUsr2(void)
+static void handleSigUsr2()
{
static int codeCacheResetCount = 0;
gDvmJit.receivedSIGUSR2 ^= true;
diff --git a/vm/StdioConverter.cpp b/vm/StdioConverter.cpp
index 6a4d845..7776688 100644
--- a/vm/StdioConverter.cpp
+++ b/vm/StdioConverter.cpp
@@ -55,7 +55,7 @@
*
* Returns immediately.
*/
-bool dvmStdioConverterStartup(void)
+bool dvmStdioConverterStartup()
{
StdPipes* pipeStorage;
@@ -122,7 +122,7 @@
* Since we know the thread is just sitting around waiting for something
* to arrive on stdout, print something.
*/
-void dvmStdioConverterShutdown(void)
+void dvmStdioConverterShutdown()
{
gDvm.haltStdioConverter = true;
if (gDvm.stdioConverterHandle == 0) // not started, or still starting
diff --git a/vm/Sync.cpp b/vm/Sync.cpp
index fc6233b..6f0a50f 100644
--- a/vm/Sync.cpp
+++ b/vm/Sync.cpp
@@ -120,7 +120,7 @@
/*
* Free the monitor list. Only used when shutting the VM down.
*/
-void dvmFreeMonitorList(void)
+void dvmFreeMonitorList()
{
Monitor* mon;
Monitor* nextMon;
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index 1754e0d..7b8f0a3 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -240,14 +240,14 @@
static void threadExitUncaughtException(Thread* thread, Object* group);
static void threadExitCheck(void* arg);
static void waitForThreadSuspend(Thread* self, Thread* thread);
-static int getThreadPriorityFromSystem(void);
+static int getThreadPriorityFromSystem();
/*
* Initialize thread list and main thread's environment. We need to set
* up some basic stuff so that dvmThreadSelf() will work when we start
* loading classes (e.g. to check for exceptions).
*/
-bool dvmThreadStartup(void)
+bool dvmThreadStartup()
{
Thread* thread;
@@ -305,7 +305,7 @@
/*
* All threads should be stopped by now. Clean up some thread globals.
*/
-void dvmThreadShutdown(void)
+void dvmThreadShutdown()
{
if (gDvm.threadList != NULL) {
/*
@@ -329,7 +329,7 @@
/*
* Grab the suspend count global lock.
*/
-static inline void lockThreadSuspendCount(void)
+static inline void lockThreadSuspendCount()
{
/*
* Don't try to change to VMWAIT here. When we change back to RUNNING
@@ -345,7 +345,7 @@
/*
* Release the suspend count global lock.
*/
-static inline void unlockThreadSuspendCount(void)
+static inline void unlockThreadSuspendCount()
{
dvmUnlockMutex(&gDvm.threadSuspendCountLock);
}
@@ -399,7 +399,7 @@
* Returns "true" if we locked it. This is a "fast" mutex, so if the
* current thread holds the lock this will fail.
*/
-bool dvmTryLockThreadList(void)
+bool dvmTryLockThreadList()
{
return (dvmTryLockMutex(&gDvm.threadListLock) == 0);
}
@@ -407,7 +407,7 @@
/*
* Release the thread list global lock.
*/
-void dvmUnlockThreadList(void)
+void dvmUnlockThreadList()
{
dvmUnlockMutex(&gDvm.threadListLock);
}
@@ -502,7 +502,7 @@
/*
* Release the "thread suspend" lock.
*/
-static inline void unlockThreadSuspend(void)
+static inline void unlockThreadSuspend()
{
dvmUnlockMutex(&gDvm._threadSuspendLock);
}
@@ -528,7 +528,7 @@
* but not necessarily the main thread. It's likely, but not guaranteed,
* that the current thread has already been cleaned up.
*/
-void dvmSlayDaemons(void)
+void dvmSlayDaemons()
{
Thread* self = dvmThreadSelf(); // may be null
Thread* target;
@@ -678,7 +678,7 @@
* it. As part of doing so, we finish initializing Thread and ThreadGroup.
* This will execute some interpreted code (e.g. class initializers).
*/
-bool dvmPrepMainThread(void)
+bool dvmPrepMainThread()
{
Thread* thread;
Object* groupObj;
@@ -879,7 +879,7 @@
* where getpid() and gettid() sometimes agree and sometimes don't depending
* on your thread model (try "export LD_ASSUME_KERNEL=2.4.19").
*/
-pid_t dvmGetSysThreadId(void)
+pid_t dvmGetSysThreadId()
{
#ifdef HAVE_GETTID
return gettid();
@@ -1002,7 +1002,7 @@
/*
* Like pthread_self(), but on a Thread*.
*/
-Thread* dvmThreadSelf(void)
+Thread* dvmThreadSelf()
{
return (Thread*) pthread_getspecific(gDvm.pthreadKeySelf);
}
@@ -1994,7 +1994,7 @@
* dedicated ThreadObject class for java/lang/Thread and moving all of our
* state into that.
*/
-void dvmDetachCurrentThread(void)
+void dvmDetachCurrentThread()
{
Thread* self = dvmThreadSelf();
Object* vmThread;
@@ -2724,7 +2724,7 @@
* Undo any debugger suspensions. This is called when the debugger
* disconnects.
*/
-void dvmUndoDebuggerSuspensions(void)
+void dvmUndoDebuggerSuspensions()
{
Thread* self = dvmThreadSelf();
Thread* thread;
@@ -3013,11 +3013,11 @@
return groupObj;
}
-Object* dvmGetSystemThreadGroup(void)
+Object* dvmGetSystemThreadGroup()
{
return getStaticThreadGroup("mSystem");
}
-Object* dvmGetMainThreadGroup(void)
+Object* dvmGetMainThreadGroup()
{
return getStaticThreadGroup("mMain");
}
@@ -3146,7 +3146,7 @@
*
* Returns a value from 1 to 10 (compatible with java.lang.Thread values).
*/
-static int getThreadPriorityFromSystem(void)
+static int getThreadPriorityFromSystem()
{
int i, sysprio, jprio;
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index f378261..1529510 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -27,7 +27,7 @@
* We're currently using a memory-mapped arena to keep things off of the
* main heap. This needs to be replaced with something real.
*/
-bool dvmGcStartup(void)
+bool dvmGcStartup()
{
dvmInitMutex(&gDvm.gcHeapLock);
@@ -38,7 +38,7 @@
* Post-zygote heap initialization, including starting
* the HeapWorker thread.
*/
-bool dvmGcStartupAfterZygote(void)
+bool dvmGcStartupAfterZygote()
{
return dvmHeapStartupAfterZygote();
}
@@ -46,7 +46,7 @@
/*
* Shutdown the threads internal to the garbage collector.
*/
-void dvmGcThreadShutdown(void)
+void dvmGcThreadShutdown()
{
dvmHeapThreadShutdown();
}
@@ -54,7 +54,7 @@
/*
* Shut the GC down.
*/
-void dvmGcShutdown(void)
+void dvmGcShutdown()
{
//TODO: grab and destroy the lock
dvmHeapShutdown();
@@ -63,12 +63,12 @@
/*
* Do any last-minute preparation before we call fork() for the first time.
*/
-bool dvmGcPreZygoteFork(void)
+bool dvmGcPreZygoteFork()
{
return dvmHeapSourceStartupBeforeFork();
}
-bool dvmGcStartupClasses(void)
+bool dvmGcStartupClasses()
{
{
const char *klassName = "Ljava/lang/ref/ReferenceQueueThread;";
@@ -166,7 +166,7 @@
* We can't do this during the initial startup because we need to execute
* the constructors.
*/
-bool dvmCreateStockExceptions(void)
+bool dvmCreateStockExceptions()
{
/*
* Pre-allocate some throwables. These need to be explicitly added
@@ -318,7 +318,7 @@
/*
* Explicitly initiate garbage collection.
*/
-void dvmCollectGarbage(void)
+void dvmCollectGarbage()
{
if (gDvm.disableExplicitGc) {
return;
diff --git a/vm/alloc/CardTable.cpp b/vm/alloc/CardTable.cpp
index d29bfa5..646a595 100644
--- a/vm/alloc/CardTable.cpp
+++ b/vm/alloc/CardTable.cpp
@@ -167,7 +167,7 @@
}
}
-void dvmClearCardTable(void)
+void dvmClearCardTable()
{
uintptr_t base[HEAP_SOURCE_MAX_HEAP_COUNT];
uintptr_t limit[HEAP_SOURCE_MAX_HEAP_COUNT];
@@ -423,7 +423,7 @@
/*
* Verifies that gray objects are on a dirty card.
*/
-void dvmVerifyCardTable(void)
+void dvmVerifyCardTable()
{
HeapBitmap *markBits = gDvm.gcHeap->markContext.bitmap;
dvmHeapBitmapWalk(markBits, verifyCardTableCallback, markBits);
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index 7385298..fca8ae7 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -147,7 +147,7 @@
static size_t sumHeapBitmap(const HeapBitmap *bitmap);
static size_t objectSize(const Object *obj);
static void scavengeDataObject(Object *obj);
-static void scavengeBlockQueue(void);
+static void scavengeBlockQueue();
/*
* We use 512-byte blocks.
@@ -502,12 +502,12 @@
* zygote process. This is a no-op for the time being. Eventually
* this will demarcate the shared region of the heap.
*/
-bool dvmHeapSourceStartupAfterZygote(void)
+bool dvmHeapSourceStartupAfterZygote()
{
return true;
}
-bool dvmHeapSourceStartupBeforeFork(void)
+bool dvmHeapSourceStartupBeforeFork()
{
assert(!"implemented");
return false;
@@ -568,7 +568,7 @@
assert(!"implemented");
}
-HeapBitmap *dvmHeapSourceGetLiveBits(void)
+HeapBitmap *dvmHeapSourceGetLiveBits()
{
return &gDvm.gcHeap->heapSource->allocBits;
}
@@ -697,7 +697,7 @@
return 0;
}
-size_t dvmHeapSourceFootprint(void)
+size_t dvmHeapSourceFootprint()
{
assert(!"implemented");
return 0;
@@ -708,12 +708,12 @@
* bytes currently committed to the heap. This starts out at the
* start size of the heap and grows toward the maximum size.
*/
-size_t dvmHeapSourceGetIdealFootprint(void)
+size_t dvmHeapSourceGetIdealFootprint()
{
return gDvm.gcHeap->heapSource->currentSize;
}
-float dvmGetTargetHeapUtilization(void)
+float dvmGetTargetHeapUtilization()
{
return 0.5f;
}
@@ -729,7 +729,7 @@
* just a no-op. Eventually, we will either allocate or commit pages
* on an as-need basis.
*/
-void dvmHeapSourceGrowForUtilization(void)
+void dvmHeapSourceGrowForUtilization()
{
/* do nothing */
}
@@ -747,7 +747,7 @@
assert(!"implemented");
}
-size_t dvmHeapSourceGetNumHeaps(void)
+size_t dvmHeapSourceGetNumHeaps()
{
return 1;
}
@@ -763,13 +763,13 @@
/* do nothing */
}
-size_t dvmGetExternalBytesAllocated(void)
+size_t dvmGetExternalBytesAllocated()
{
assert(!"implemented");
return 0;
}
-void dvmHeapSourceFlip(void)
+void dvmHeapSourceFlip()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
@@ -1112,7 +1112,7 @@
scavengeBlockQueue();
}
-void processFinalizableReferences(void)
+void processFinalizableReferences()
{
HeapRefTable newPendingRefs;
LargeHeapRefTable *finRefs = gDvm.gcHeap->finalizableRefs;
@@ -1431,7 +1431,7 @@
LOG_PIN("<<< pinHashTableEntries(table=%p)", table);
}
-static void pinPrimitiveClasses(void)
+static void pinPrimitiveClasses()
{
size_t length = ARRAYSIZE(gDvm.primitiveClass);
for (size_t i = 0; i < length; i++) {
@@ -1446,7 +1446,7 @@
* been pinned and are therefore ignored. Non-permanent strings that
* have been forwarded are snapped. All other entries are removed.
*/
-static void scavengeInternedStrings(void)
+static void scavengeInternedStrings()
{
HashTable *table = gDvm.internedStrings;
if (table == NULL) {
@@ -1469,7 +1469,7 @@
dvmHashTableUnlock(table);
}
-static void pinInternedStrings(void)
+static void pinInternedStrings()
{
HashTable *table = gDvm.internedStrings;
if (table == NULL) {
@@ -1730,7 +1730,7 @@
scavengeThreadStack(thread);
}
-static void scavengeThreadList(void)
+static void scavengeThreadList()
{
Thread *thread;
@@ -1865,7 +1865,7 @@
}
}
-static void pinThreadList(void)
+static void pinThreadList()
{
Thread *thread;
@@ -2009,7 +2009,7 @@
/*
* Blackens promoted objects.
*/
-static void scavengeBlockQueue(void)
+static void scavengeBlockQueue()
{
HeapSource *heapSource;
size_t block;
@@ -2032,7 +2032,7 @@
* in new space. This should be parametrized so we can invoke this
* routine outside of the context of a collection.
*/
-static void verifyNewSpace(void)
+static void verifyNewSpace()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
size_t c0 = 0, c1 = 0, c2 = 0, c7 = 0;
@@ -2056,7 +2056,7 @@
}
}
-void describeHeap(void)
+void describeHeap()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
describeBlocks(heapSource);
@@ -2070,7 +2070,7 @@
* registers and various globals. Lastly, a verification of the heap
* is performed. The last phase should be optional.
*/
-void dvmScavengeRoots(void) /* Needs a new name badly */
+void dvmScavengeRoots() /* Needs a new name badly */
{
GcHeap *gcHeap;
@@ -2206,22 +2206,22 @@
return true;
}
-void dvmHeapFinishMarkStep(void)
+void dvmHeapFinishMarkStep()
{
/* do nothing */
}
-void dvmHeapMarkRootSet(void)
+void dvmHeapMarkRootSet()
{
/* do nothing */
}
-void dvmHeapScanMarkedObjects(void)
+void dvmHeapScanMarkedObjects()
{
dvmScavengeRoots();
}
-void dvmHeapScheduleFinalizations(void)
+void dvmHeapScheduleFinalizations()
{
/* do nothing */
}
@@ -2233,12 +2233,12 @@
/* do nothing */
}
-void dvmMarkDirtyObjects(void)
+void dvmMarkDirtyObjects()
{
assert(!"implemented");
}
-void dvmHeapSourceThreadShutdown(void)
+void dvmHeapSourceThreadShutdown()
{
/* do nothing */
}
diff --git a/vm/alloc/Heap.cpp b/vm/alloc/Heap.cpp
index c8b6341..34f56cc 100644
--- a/vm/alloc/Heap.cpp
+++ b/vm/alloc/Heap.cpp
@@ -108,7 +108,7 @@
return true;
}
-bool dvmHeapStartupAfterZygote(void)
+bool dvmHeapStartupAfterZygote()
{
return dvmHeapSourceStartupAfterZygote();
}
@@ -129,7 +129,7 @@
/*
* Shutdown any threads internal to the heap.
*/
-void dvmHeapThreadShutdown(void)
+void dvmHeapThreadShutdown()
{
dvmHeapSourceThreadShutdown();
}
@@ -436,7 +436,7 @@
return dvmHeapSourceChunkSize(obj);
}
-static void verifyRootsAndHeap(void)
+static void verifyRootsAndHeap()
{
dvmVerifyRoots();
dvmVerifyBitmap(dvmHeapSourceGetLiveBits());
@@ -447,7 +447,7 @@
* original priority if successful. Otherwise, returns INT_MAX on
* failure.
*/
-static int raiseThreadPriority(void)
+static int raiseThreadPriority()
{
/* Get the priority (the "nice" value) of the current thread. The
* getpriority() call can legitimately return -1, so we have to
@@ -773,7 +773,7 @@
* suspend when the GC thread calls dvmUnlockHeap before dvmResumeAllThreads,
* but there's no risk of deadlock.)
*/
-void dvmWaitForConcurrentGcToComplete(void)
+void dvmWaitForConcurrentGcToComplete()
{
Thread *self = dvmThreadSelf();
assert(self != NULL);
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp
index 0f47fba..9e12b58 100644
--- a/vm/alloc/HeapSource.cpp
+++ b/vm/alloc/HeapSource.cpp
@@ -32,7 +32,7 @@
extern "C" int dlmalloc_trim(size_t);
extern "C" void dlmalloc_walk_free_pages(void(*)(void*, void*, void*), void*);
-static void snapIdealFootprint(void);
+static void snapIdealFootprint();
static void setIdealFootprint(size_t max);
static size_t getMaximumSize(const HeapSource *hs);
@@ -426,7 +426,7 @@
return NULL;
}
-static bool gcDaemonStartup(void)
+static bool gcDaemonStartup()
{
dvmInitMutex(&gHs->gcThreadMutex);
pthread_cond_init(&gHs->gcThreadCond, NULL);
@@ -436,7 +436,7 @@
return gHs->hasGcThread;
}
-static void gcDaemonShutdown(void)
+static void gcDaemonShutdown()
{
if (gHs->hasGcThread) {
dvmLockMutex(&gHs->gcThreadMutex);
@@ -575,7 +575,7 @@
return NULL;
}
-bool dvmHeapSourceStartupAfterZygote(void)
+bool dvmHeapSourceStartupAfterZygote()
{
return gDvm.concurrentMarkSweep ? gcDaemonStartup() : true;
}
@@ -608,7 +608,7 @@
return true;
}
-void dvmHeapSourceThreadShutdown(void)
+void dvmHeapSourceThreadShutdown()
{
if (gDvm.gcHeap != NULL && gDvm.concurrentMarkSweep) {
gcDaemonShutdown();
@@ -640,7 +640,7 @@
/*
* Gets the begining of the allocation for the HeapSource.
*/
-void *dvmHeapSourceGetBase(void)
+void *dvmHeapSourceGetBase()
{
return gHs->heapBase;
}
@@ -712,7 +712,7 @@
/*
* Get the bitmap representing all live objects.
*/
-HeapBitmap *dvmHeapSourceGetLiveBits(void)
+HeapBitmap *dvmHeapSourceGetLiveBits()
{
HS_BOILERPLATE();
@@ -722,14 +722,14 @@
/*
* Get the bitmap representing all marked objects.
*/
-HeapBitmap *dvmHeapSourceGetMarkBits(void)
+HeapBitmap *dvmHeapSourceGetMarkBits()
{
HS_BOILERPLATE();
return &gHs->markBits;
}
-void dvmHeapSourceSwapBitmaps(void)
+void dvmHeapSourceSwapBitmaps()
{
HeapBitmap tmp;
@@ -738,7 +738,7 @@
gHs->markBits = tmp;
}
-void dvmHeapSourceZeroMarkBitmap(void)
+void dvmHeapSourceZeroMarkBitmap()
{
HS_BOILERPLATE();
diff --git a/vm/alloc/MarkSweep.cpp b/vm/alloc/MarkSweep.cpp
index 0bb5f02..a81d3ea 100644
--- a/vm/alloc/MarkSweep.cpp
+++ b/vm/alloc/MarkSweep.cpp
@@ -372,7 +372,7 @@
/*
* Grays all references in the roots.
*/
-void dvmHeapReMarkRootSet(void)
+void dvmHeapReMarkRootSet()
{
GcMarkContext *ctx = &gDvm.gcHeap->markContext;
assert(ctx->finger == (void *)ULONG_MAX);
@@ -726,7 +726,7 @@
processMarkStack(ctx);
}
-void dvmHeapReScanMarkedObjects(void)
+void dvmHeapReScanMarkedObjects()
{
GcMarkContext *ctx = &gDvm.gcHeap->markContext;
@@ -997,7 +997,7 @@
return !isMarked((Object *)obj, &gDvm.gcHeap->markContext);
}
-void sweepWeakJniGlobals(void)
+void sweepWeakJniGlobals()
{
IndirectRefTable *table = &gDvm.jniWeakGlobalRefTable;
Object **entry = table->table;
@@ -1014,7 +1014,7 @@
* Process all the internal system structures that behave like
* weakly-held objects.
*/
-void dvmHeapSweepSystemWeaks(void)
+void dvmHeapSweepSystemWeaks()
{
dvmGcDetachDeadInternedStrings(isUnmarkedObject);
dvmSweepMonitorList(&gDvm.monitorList, isUnmarkedObject);
diff --git a/vm/alloc/Verify.cpp b/vm/alloc/Verify.cpp
index f36f44b..1a8307a 100644
--- a/vm/alloc/Verify.cpp
+++ b/vm/alloc/Verify.cpp
@@ -145,7 +145,7 @@
/*
* Verifies references in the roots.
*/
-void dvmVerifyRoots(void)
+void dvmVerifyRoots()
{
dvmVisitRoots(verifyRootReference, NULL);
}
diff --git a/vm/analysis/CodeVerify.cpp b/vm/analysis/CodeVerify.cpp
index 3754f4a..2bf67d4 100644
--- a/vm/analysis/CodeVerify.cpp
+++ b/vm/analysis/CodeVerify.cpp
@@ -105,7 +105,7 @@
/* fwd */
#ifndef NDEBUG
-static void checkMergeTab(void);
+static void checkMergeTab();
#endif
static bool isInitMethod(const Method* meth);
static RegType getInvocationThis(const RegisterLine* registerLine,\
@@ -218,7 +218,7 @@
/*
* Verify symmetry in the conversion table.
*/
-static void checkMergeTab(void)
+static void checkMergeTab()
{
int i, j;
@@ -3428,7 +3428,7 @@
/*
* One-time preparation.
*/
-static void verifyPrep(void)
+static void verifyPrep()
{
#ifndef NDEBUG
/* only need to do this if the table was updated */
diff --git a/vm/analysis/Optimize.cpp b/vm/analysis/Optimize.cpp
index c539ee9..8ac5e0e 100644
--- a/vm/analysis/Optimize.cpp
+++ b/vm/analysis/Optimize.cpp
@@ -62,7 +62,7 @@
* TODO: this is currently just a linear array. We will want to put this
* into a hash table as the list size increases.
*/
-bool dvmCreateInlineSubsTable(void)
+bool dvmCreateInlineSubsTable()
{
const InlineOperation* ops = dvmGetInlineOpsTable();
const int count = dvmGetInlineOpsTableLength();
@@ -106,7 +106,7 @@
/*
* Release inline sub data structure.
*/
-void dvmFreeInlineSubsTable(void)
+void dvmFreeInlineSubsTable()
{
free(gDvm.inlineSubs);
gDvm.inlineSubs = NULL;
diff --git a/vm/analysis/RegisterMap.cpp b/vm/analysis/RegisterMap.cpp
index 993f22f..54b5768 100644
--- a/vm/analysis/RegisterMap.cpp
+++ b/vm/analysis/RegisterMap.cpp
@@ -109,7 +109,7 @@
/*
* Prepare some things.
*/
-bool dvmRegisterMapStartup(void)
+bool dvmRegisterMapStartup()
{
#ifdef REGISTER_MAP_STATS
MapStats* pStats = calloc(1, sizeof(MapStats));
@@ -121,7 +121,7 @@
/*
* Clean up.
*/
-void dvmRegisterMapShutdown(void)
+void dvmRegisterMapShutdown()
{
#ifdef REGISTER_MAP_STATS
free(gDvm.registerMapStats);
@@ -131,7 +131,7 @@
/*
* Write stats to log file.
*/
-void dvmRegisterMapDumpStats(void)
+void dvmRegisterMapDumpStats()
{
#ifdef REGISTER_MAP_STATS
MapStats* pStats = (MapStats*) gDvm.registerMapStats;
diff --git a/vm/interp/Interp.cpp b/vm/interp/Interp.cpp
index 8321cf7..6684c4a 100644
--- a/vm/interp/Interp.cpp
+++ b/vm/interp/Interp.cpp
@@ -37,7 +37,7 @@
*/
// fwd
-static BreakpointSet* dvmBreakpointSetAlloc(void);
+static BreakpointSet* dvmBreakpointSetAlloc();
static void dvmBreakpointSetFree(BreakpointSet* pSet);
#if defined(WITH_JIT)
@@ -58,7 +58,7 @@
/*
* Initialize global breakpoint structures.
*/
-bool dvmBreakpointStartup(void)
+bool dvmBreakpointStartup()
{
gDvm.breakpointSet = dvmBreakpointSetAlloc();
return (gDvm.breakpointSet != NULL);
@@ -67,7 +67,7 @@
/*
* Free resources.
*/
-void dvmBreakpointShutdown(void)
+void dvmBreakpointShutdown()
{
dvmBreakpointSetFree(gDvm.breakpointSet);
}
@@ -102,7 +102,7 @@
/*
* Initialize a BreakpointSet. Initially empty.
*/
-static BreakpointSet* dvmBreakpointSetAlloc(void)
+static BreakpointSet* dvmBreakpointSetAlloc()
{
BreakpointSet* pSet = (BreakpointSet*) calloc(1, sizeof(*pSet));
@@ -390,7 +390,7 @@
/*
* Do any debugger-attach-time initialization.
*/
-void dvmInitBreakpoints(void)
+void dvmInitBreakpoints()
{
/* quick sanity check */
BreakpointSet* pSet = gDvm.breakpointSet;
diff --git a/vm/interp/Jit.cpp b/vm/interp/Jit.cpp
index 82dd6b6..5ac7921 100644
--- a/vm/interp/Jit.cpp
+++ b/vm/interp/Jit.cpp
@@ -1374,7 +1374,7 @@
/*
* Reset the JitTable to the initial clean state.
*/
-void dvmJitResetTable(void)
+void dvmJitResetTable()
{
JitEntry *jitEntry = gDvmJit.pJitEntryTable;
unsigned int size = gDvmJit.jitTableSize;
diff --git a/vm/jdwp/ExpandBuf.cpp b/vm/jdwp/ExpandBuf.cpp
index cb3386b..8162128 100644
--- a/vm/jdwp/ExpandBuf.cpp
+++ b/vm/jdwp/ExpandBuf.cpp
@@ -38,7 +38,7 @@
/*
* Allocate a JdwpBuf and some initial storage.
*/
-ExpandBuf* expandBufAlloc(void)
+ExpandBuf* expandBufAlloc()
{
ExpandBuf* newBuf;
diff --git a/vm/jdwp/JdwpAdb.cpp b/vm/jdwp/JdwpAdb.cpp
index 3376910..9a57baa 100644
--- a/vm/jdwp/JdwpAdb.cpp
+++ b/vm/jdwp/JdwpAdb.cpp
@@ -89,8 +89,7 @@
}
-static JdwpNetState*
-adbStateAlloc(void)
+static JdwpNetState* adbStateAlloc()
{
JdwpNetState* netState = (JdwpNetState*) calloc(sizeof(*netState),1);
@@ -343,7 +342,7 @@
if (netState->wakeFds[1] >= 0) {
LOGV("+++ writing to wakePipe\n");
- (void) write(netState->wakeFds[1], "", 1);
+ write(netState->wakeFds[1], "", 1);
}
}
@@ -755,7 +754,7 @@
/*
* Return our set.
*/
-const JdwpTransport* dvmJdwpAndroidAdbTransport(void)
+const JdwpTransport* dvmJdwpAndroidAdbTransport()
{
return &socketTransport;
}
diff --git a/vm/jdwp/JdwpEvent.cpp b/vm/jdwp/JdwpEvent.cpp
index 3869fbd..f93faaa 100644
--- a/vm/jdwp/JdwpEvent.cpp
+++ b/vm/jdwp/JdwpEvent.cpp
@@ -706,7 +706,7 @@
* Prep an event. Allocates storage for the message and leaves space for
* the header.
*/
-static ExpandBuf* eventPrep(void)
+static ExpandBuf* eventPrep()
{
ExpandBuf* pReq = expandBufAlloc();
expandBufAddSpace(pReq, kJDWPHeaderLen);
diff --git a/vm/jdwp/JdwpMain.cpp b/vm/jdwp/JdwpMain.cpp
index 24e5c6c..4a33913 100644
--- a/vm/jdwp/JdwpMain.cpp
+++ b/vm/jdwp/JdwpMain.cpp
@@ -372,7 +372,7 @@
/*
* Get a notion of the current time, in milliseconds.
*/
-s8 dvmJdwpGetNowMsec(void)
+s8 dvmJdwpGetNowMsec()
{
#ifdef HAVE_POSIX_CLOCKS
struct timespec now;
diff --git a/vm/jdwp/JdwpSocket.cpp b/vm/jdwp/JdwpSocket.cpp
index 0c39202..d318b50 100644
--- a/vm/jdwp/JdwpSocket.cpp
+++ b/vm/jdwp/JdwpSocket.cpp
@@ -918,7 +918,7 @@
/*
* Return our set.
*/
-const JdwpTransport* dvmJdwpSocketTransport(void)
+const JdwpTransport* dvmJdwpSocketTransport()
{
return &socketTransport;
}
diff --git a/vm/mterp/Mterp.cpp b/vm/mterp/Mterp.cpp
index fa9b037..7172434 100644
--- a/vm/mterp/Mterp.cpp
+++ b/vm/mterp/Mterp.cpp
@@ -25,7 +25,7 @@
/*
* Verify some constants used by the mterp interpreter.
*/
-bool dvmCheckAsmConstants(void)
+bool dvmCheckAsmConstants()
{
bool failed = false;
diff --git a/vm/native/InternalNative.cpp b/vm/native/InternalNative.cpp
index c873472..7ebe8b9 100644
--- a/vm/native/InternalNative.cpp
+++ b/vm/native/InternalNative.cpp
@@ -67,7 +67,7 @@
/*
* Set up hash values on the class names.
*/
-bool dvmInternalNativeStartup(void)
+bool dvmInternalNativeStartup()
{
DalvikNativeClass* classPtr = gDvmNativeMethodSet;
@@ -87,7 +87,7 @@
/*
* Clean up.
*/
-void dvmInternalNativeShutdown(void)
+void dvmInternalNativeShutdown()
{
dvmHashTableFree(gDvm.userDexFiles);
}
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp
index 811e103..7f69f26 100644
--- a/vm/oo/Class.cpp
+++ b/vm/oo/Class.cpp
@@ -369,7 +369,7 @@
* Create the initial class instances. These consist of the class
* Class and all of the classes representing primitive types.
*/
-static bool createInitialClasses(void) {
+static bool createInitialClasses() {
/*
* Initialize the class Class. This has to be done specially, particularly
* because it is an instance of itself.
@@ -409,7 +409,7 @@
*
* Call this after the bootclasspath string has been finalized.
*/
-bool dvmClassStartup(void)
+bool dvmClassStartup()
{
/* make this a requirement -- don't currently support dirs in path */
if (strcmp(gDvm.bootClassPathStr, ".") == 0) {
@@ -468,7 +468,7 @@
/*
* Clean up.
*/
-void dvmClassShutdown(void)
+void dvmClassShutdown()
{
/* discard all system-loaded classes */
dvmHashTableFree(gDvm.loadedClasses);
@@ -533,7 +533,7 @@
/*
* Dump the contents of the bootstrap class path.
*/
-void dvmDumpBootClassPath(void)
+void dvmDumpBootClassPath()
{
dumpClassPath(gDvm.bootClassPath);
}
@@ -860,7 +860,7 @@
*
* (Used for ClassLoader.getResources().)
*/
-int dvmGetBootPathSize(void)
+int dvmGetBootPathSize()
{
const ClassPathEntry* cpe = gDvm.bootClassPath;
@@ -1205,7 +1205,7 @@
/*
* Check the performance of the "loadedClasses" hash table.
*/
-void dvmCheckClassTablePerf(void)
+void dvmCheckClassTablePerf()
{
dvmHashTableLock(gDvm.loadedClasses);
dvmHashTableProbeCount(gDvm.loadedClasses, hashcalcClass,
@@ -4652,7 +4652,7 @@
*
* The caller must call dvmReleaseTrackedAlloc on the result.
*/
-Object* dvmGetSystemClassLoader(void)
+Object* dvmGetSystemClassLoader()
{
Thread* self = dvmThreadSelf();
ClassObject* clClass = gDvm.classJavaLangClassLoader;
@@ -4873,7 +4873,7 @@
/*
* Dump the field access counts for all loaded classes.
*/
-void dvmDumpFieldAccessCounts(void)
+void dvmDumpFieldAccessCounts()
{
dvmHashTableLock(gDvm.loadedClasses);
dvmHashForeach(gDvm.loadedClasses, dumpAccessCounts, NULL);
diff --git a/vm/oo/TypeCheck.cpp b/vm/oo/TypeCheck.cpp
index fdd38ea..1116d15 100644
--- a/vm/oo/TypeCheck.cpp
+++ b/vm/oo/TypeCheck.cpp
@@ -36,7 +36,7 @@
/*
* Allocate cache.
*/
-bool dvmInstanceofStartup(void)
+bool dvmInstanceofStartup()
{
gDvm.instanceofCache = dvmAllocAtomicCache(INSTANCEOF_CACHE_SIZE);
if (gDvm.instanceofCache == NULL)
@@ -47,7 +47,7 @@
/*
* Discard the cache.
*/
-void dvmInstanceofShutdown(void)
+void dvmInstanceofShutdown()
{
dvmFreeAtomicCache(gDvm.instanceofCache);
}
diff --git a/vm/reflect/Annotation.cpp b/vm/reflect/Annotation.cpp
index 53ed206..e0b91f4 100644
--- a/vm/reflect/Annotation.cpp
+++ b/vm/reflect/Annotation.cpp
@@ -106,7 +106,7 @@
*
* Caller must call dvmReleaseTrackedAlloc().
*/
-static ArrayObject* emptyAnnoArray(void)
+static ArrayObject* emptyAnnoArray()
{
return dvmAllocArrayByClass(
gDvm.classJavaLangAnnotationAnnotationArray, 0, ALLOC_DEFAULT);
diff --git a/vm/test/AtomicTest.cpp b/vm/test/AtomicTest.cpp
index 52f29cc..26ac2bc 100644
--- a/vm/test/AtomicTest.cpp
+++ b/vm/test/AtomicTest.cpp
@@ -66,7 +66,7 @@
/*
* Get a relative time value.
*/
-static int64_t getRelativeTimeNsec(void)
+static int64_t getRelativeTimeNsec()
{
#define HAVE_POSIX_CLOCKS
#ifdef HAVE_POSIX_CLOCKS
@@ -87,17 +87,17 @@
* If these get inlined the compiler may figure out what we're up to and
* completely elide the operations.
*/
-static void incr(void) __attribute__((noinline));
-static void decr(void) __attribute__((noinline));
+static void incr() __attribute__((noinline));
+static void decr() __attribute__((noinline));
static void add(int addVal) __attribute__((noinline));
static int compareAndSwap(int oldVal, int newVal, int* addr) __attribute__((noinline));
static int compareAndSwapWide(int64_t oldVal, int64_t newVal, int64_t* addr) __attribute__((noinline));
-static void incr(void)
+static void incr()
{
incTest++;
}
-static void decr(void)
+static void decr()
{
decTest--;
}
@@ -207,16 +207,16 @@
for (i = repeatCount / 10; i != 0; i--) {
if (USE_ATOMIC) {
// succeed 10x
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
- (void) android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
+ android_atomic_release_cas(7, 7, valuePtr);
} else {
// succeed 10x
compareAndSwap(7, 7, valuePtr);
@@ -239,7 +239,7 @@
return end - start;
}
-static void testAtomicSpeed(void)
+static void testAtomicSpeed()
{
static const int kIterations = 10;
static const int kRepeatCount = 5 * 1000 * 1000;
@@ -264,7 +264,7 @@
/*
* Start tests, show results.
*/
-bool dvmTestAtomicSpeed(void)
+bool dvmTestAtomicSpeed()
{
pthread_t threads[THREAD_COUNT];
void *(*startRoutine)(void*) = atomicTest;
diff --git a/vm/test/TestHash.cpp b/vm/test/TestHash.cpp
index b458028..9eabbb6 100644
--- a/vm/test/TestHash.cpp
+++ b/vm/test/TestHash.cpp
@@ -75,7 +75,7 @@
/*
* Some quick hash table tests.
*/
-bool dvmTestHash(void)
+bool dvmTestHash()
{
HashTable* pTab;
char tmpStr[64];
diff --git a/vm/test/TestIndirectRefTable.cpp b/vm/test/TestIndirectRefTable.cpp
index 155ba32..a72e2b0 100644
--- a/vm/test/TestIndirectRefTable.cpp
+++ b/vm/test/TestIndirectRefTable.cpp
@@ -28,7 +28,7 @@
/*
* Basic add/get/delete tests in an unsegmented table.
*/
-static bool basicTest(void)
+static bool basicTest()
{
static const int kTableMax = 20;
IndirectRefTable irt;
@@ -313,7 +313,7 @@
/*
* Test operations on a segmented table.
*/
-static bool segmentTest(void)
+static bool segmentTest()
{
static const int kTableMax = 20;
IndirectRefTable irt;
@@ -471,7 +471,7 @@
/*
* Some quick tests.
*/
-bool dvmTestIndirectRefTable(void)
+bool dvmTestIndirectRefTable()
{
if (!basicTest()) {
LOGE("IRT basic test failed\n");