Bug 1302401 - Find and remove redundant void argument lists.
MozReview-Commit-ID: 3ZkSYEN048P
--- a/js/src/dtoa.c
+++ b/js/src/dtoa.c
@@ -488,17 +488,17 @@ DtoaState {
#define STATE_PARAM_DECL DtoaState *state;
#else
#define STATE_PARAM DtoaState *state,
#endif
#define PASS_STATE state,
#define GET_STATE(field) (state->field)
static DtoaState *
-newdtoa(void)
+newdtoa()
{
DtoaState *state = (DtoaState *) MALLOC(sizeof(DtoaState));
if (state) {
memset(state, 0, sizeof(DtoaState));
#ifndef Omit_Private_Memory
state->pmem_next = state->private_mem;
#endif
}
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -887,17 +887,17 @@ class MOZ_STACK_CLASS SourceBufferHolder
This flag only valid when defining over
an existing property. */
#define JSPROP_IGNORE_VALUE 0x20000 /* ignore the Value in the descriptor. Nothing was
specified when passed to Object.defineProperty
from script. */
/** Microseconds since the epoch, midnight, January 1, 1970 UTC. */
extern JS_PUBLIC_API(int64_t)
-JS_Now(void);
+JS_Now();
/** Don't want to export data, so provide accessors for non-inline Values. */
extern JS_PUBLIC_API(JS::Value)
JS_GetNaNValue(JSContext* cx);
extern JS_PUBLIC_API(JS::Value)
JS_GetNegativeInfinityValue(JSContext* cx);
@@ -1228,17 +1228,17 @@ InitSelfHostedCode(JSContext* cx);
* thread's context.
*/
JS_PUBLIC_API(void)
AssertObjectBelongsToCurrentThread(JSObject* obj);
} /* namespace JS */
extern JS_PUBLIC_API(const char*)
-JS_GetImplementationVersion(void);
+JS_GetImplementationVersion();
extern JS_PUBLIC_API(void)
JS_SetDestroyCompartmentCallback(JSContext* cx, JSDestroyCompartmentCallback callback);
extern JS_PUBLIC_API(void)
JS_SetSizeOfIncludingThisCompartmentCallback(JSContext* cx,
JSSizeOfIncludingThisCompartmentCallback callback);
--- a/js/src/jspubtd.h
+++ b/js/src/jspubtd.h
@@ -105,17 +105,17 @@ struct JSRuntime;
struct JSSecurityCallbacks;
struct JSStructuredCloneCallbacks;
struct JSStructuredCloneReader;
struct JSStructuredCloneWriter;
class JS_PUBLIC_API(JSTracer);
class JSFlatString;
-typedef bool (*JSInitCallback)(void);
+typedef bool (*JSInitCallback)();
template<typename T> struct JSConstScalarSpec;
typedef JSConstScalarSpec<double> JSConstDoubleSpec;
typedef JSConstScalarSpec<int32_t> JSConstIntegerSpec;
/*
* Generic trace operation that calls JS::TraceEdge on each traceable thing's
* location reachable from data.
--- a/js/src/vm/Initialization.cpp
+++ b/js/src/vm/Initialization.cpp
@@ -117,17 +117,17 @@ JS::detail::InitWithFailureDiagnostic(bo
libraryInitState = InitState::Running;
return nullptr;
}
#undef RETURN_IF_FAIL
JS_PUBLIC_API(void)
-JS_ShutDown(void)
+JS_ShutDown()
{
MOZ_ASSERT(libraryInitState == InitState::Running,
"JS_ShutDown must only be called after JS_Init and can't race with it");
#ifdef DEBUG
if (JSRuntime::hasLiveRuntimes()) {
// Gecko is too buggy to assert this just yet.
fprintf(stderr,
"WARNING: YOU ARE LEAKING THE WORLD (at least one JSRuntime "
--- a/js/src/vm/Time.h
+++ b/js/src/vm/Time.h
@@ -142,17 +142,17 @@ ReadTimestampCounter(void)
uint64_t x;
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
return x;
}
#elif defined(__x86_64__)
static __inline__ uint64_t
-ReadTimestampCounter(void)
+ReadTimestampCounter()
{
unsigned hi, lo;
__asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
}
#else
--- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp
+++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp
@@ -763,17 +763,17 @@ public:
mPrecompiler = nullptr;
}
private:
ScriptPrecompiler* mPrecompiler;
};
NS_IMETHODIMP
-NotifyPrecompilationCompleteRunnable::Run(void)
+NotifyPrecompilationCompleteRunnable::Run()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mPrecompiler);
AutoSendObserverNotification notifier(mPrecompiler);
if (mToken) {
JSContext* cx = XPCJSRuntime::Get()->Context();
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -3508,18 +3508,18 @@ public:
private:
static ComponentsSH singleton;
};
ComponentsSH ComponentsSH::singleton(0);
// Singleton refcounting.
-NS_IMETHODIMP_(MozExternalRefCountType) ComponentsSH::AddRef(void) { return 1; }
-NS_IMETHODIMP_(MozExternalRefCountType) ComponentsSH::Release(void) { return 1; }
+NS_IMETHODIMP_(MozExternalRefCountType) ComponentsSH::AddRef() { return 1; }
+NS_IMETHODIMP_(MozExternalRefCountType) ComponentsSH::Release() { return 1; }
NS_INTERFACE_MAP_BEGIN(ComponentsSH)
NS_INTERFACE_MAP_ENTRY(nsIXPCScriptable)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
#define NSXPCCOMPONENTSBASE_CID \
{ 0xc62998e5, 0x95f1, 0x4058, \