Bug 1302401 - Find and remove redundant void argument lists. draft
authorSylvestre Ledru <sylvestre@debian.org>
Tue, 13 Sep 2016 14:23:04 +0200
changeset 413618 4c0882cf750cb7c5e2e8a2dde8fc420c51f57842
parent 413617 e08216ed2a6397408682396800c9667e64bc073e
child 413619 e84c6e2880291ca35d63b71e0e9e902efd82afb8
push id29456
push usersledru@mozilla.com
push dateWed, 14 Sep 2016 14:17:25 +0000
bugs1302401
milestone51.0a1
Bug 1302401 - Find and remove redundant void argument lists. MozReview-Commit-ID: 3ZkSYEN048P
js/src/dtoa.c
js/src/jsapi.h
js/src/jspubtd.h
js/src/vm/Initialization.cpp
js/src/vm/Time.h
js/xpconnect/loader/mozJSSubScriptLoader.cpp
js/xpconnect/src/XPCComponents.cpp
--- 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, \