Commit 43591b0d authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Drop redundant void parameters from function declarations

Summary:
This is C++, not C, so let's keep things modern.
This is applying the modernize-redundant-void-arg clang-tidy check to Folly.

Reviewed By: yfeldblum

Differential Revision: D6106921

fbshipit-source-id: 06a56f036f59426df5dd475bf91a3f4a335266f5
parent 8de0628c
...@@ -38,7 +38,7 @@ class IPAddressFormatException : public std::exception { ...@@ -38,7 +38,7 @@ class IPAddressFormatException : public std::exception {
IPAddressFormatException& operator=(IPAddressFormatException&&) = default; IPAddressFormatException& operator=(IPAddressFormatException&&) = default;
~IPAddressFormatException() noexcept override {} ~IPAddressFormatException() noexcept override {}
const char* what(void) const noexcept override { const char* what() const noexcept override {
return msg_.c_str(); return msg_.c_str();
} }
......
...@@ -379,13 +379,15 @@ struct StaticMeta : StaticMetaBase { ...@@ -379,13 +379,15 @@ struct StaticMeta : StaticMetaBase {
#endif #endif
} }
static void preFork(void) { static void preFork() {
instance().lock_.lock(); // Make sure it's created instance().lock_.lock(); // Make sure it's created
} }
static void onForkParent(void) { instance().lock_.unlock(); } static void onForkParent() {
instance().lock_.unlock();
}
static void onForkChild(void) { static void onForkChild() {
// only the current thread survives // only the current thread survives
instance().head_.next = instance().head_.prev = &instance().head_; instance().head_.next = instance().head_.prev = &instance().head_;
ThreadEntry* threadEntry = getThreadEntry(); ThreadEntry* threadEntry = getThreadEntry();
......
...@@ -50,7 +50,7 @@ class ThreadPoolExecutor : public virtual folly::Executor { ...@@ -50,7 +50,7 @@ class ThreadPoolExecutor : public virtual folly::Executor {
threadFactory_ = std::move(threadFactory); threadFactory_ = std::move(threadFactory);
} }
std::shared_ptr<ThreadFactory> getThreadFactory(void) { std::shared_ptr<ThreadFactory> getThreadFactory() {
return threadFactory_; return threadFactory_;
} }
......
...@@ -36,7 +36,7 @@ using namespace __cxxabiv1; ...@@ -36,7 +36,7 @@ using namespace __cxxabiv1;
extern "C" { extern "C" {
StackTraceStack* getExceptionStackTraceStack(void) __attribute__((__weak__)); StackTraceStack* getExceptionStackTraceStack(void) __attribute__((__weak__));
typedef StackTraceStack* (*GetExceptionStackTraceStackType)(void); typedef StackTraceStack* (*GetExceptionStackTraceStackType)();
GetExceptionStackTraceStackType getExceptionStackTraceStackFn; GetExceptionStackTraceStackType getExceptionStackTraceStackFn;
} }
......
...@@ -31,8 +31,8 @@ namespace detail { ...@@ -31,8 +31,8 @@ namespace detail {
*/ */
void dummyCxaThrow(void*, std::type_info*, void (*)(void*)) noexcept; void dummyCxaThrow(void*, std::type_info*, void (*)(void*)) noexcept;
void dummyCxaBeginCatch(void*) noexcept; void dummyCxaBeginCatch(void*) noexcept;
void dummyCxaRethrow(void) noexcept; void dummyCxaRethrow() noexcept;
void dummyCxaEndCatch(void) noexcept; void dummyCxaEndCatch() noexcept;
void dummyRethrowException(std::exception_ptr) noexcept; void dummyRethrowException(std::exception_ptr) noexcept;
} }
......
...@@ -40,7 +40,7 @@ void installFatalSignalHandler(); ...@@ -40,7 +40,7 @@ void installFatalSignalHandler();
* All these fatal callback must be added before calling * All these fatal callback must be added before calling
* installFatalSignalCallbacks(), below. * installFatalSignalCallbacks(), below.
*/ */
typedef void (*SignalCallback)(void); typedef void (*SignalCallback)();
void addFatalSignalCallback(SignalCallback callback); void addFatalSignalCallback(SignalCallback callback);
/** /**
......
...@@ -184,7 +184,7 @@ static BIO_METHOD* getSSLBioMethod() { ...@@ -184,7 +184,7 @@ static BIO_METHOD* getSSLBioMethod() {
return instance; return instance;
} }
void* initsslBioMethod(void) { void* initsslBioMethod() {
auto sslBioMethod = getSSLBioMethod(); auto sslBioMethod = getSSLBioMethod();
// override the bwrite method for MSG_EOR support // override the bwrite method for MSG_EOR support
OpenSSLUtils::setCustomBioWriteMethod(sslBioMethod, AsyncSSLSocket::bioWrite); OpenSSLUtils::setCustomBioWriteMethod(sslBioMethod, AsyncSSLSocket::bioWrite);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
// OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different // OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different
// from the compile-time version // from the compile-time version
struct OpenSSLVersionFinder { struct OpenSSLVersionFinder {
static std::string getOpenSSLLongVersion(void) { static std::string getOpenSSLLongVersion() {
#ifdef OPENSSL_VERSION_TEXT #ifdef OPENSSL_VERSION_TEXT
return SSLeay_version(SSLEAY_VERSION); return SSLeay_version(SSLEAY_VERSION);
#elif defined(OPENSSL_VERSION_NUMBER) #elif defined(OPENSSL_VERSION_NUMBER)
...@@ -32,7 +32,7 @@ struct OpenSSLVersionFinder { ...@@ -32,7 +32,7 @@ struct OpenSSLVersionFinder {
#endif #endif
} }
uint64_t getOpenSSLNumericVersion(void) { uint64_t getOpenSSLNumericVersion() {
#ifdef OPENSSL_VERSION_NUMBER #ifdef OPENSSL_VERSION_NUMBER
return SSLeay(); return SSLeay();
#else #else
......
...@@ -51,7 +51,7 @@ SSLSessionImpl::~SSLSessionImpl() { ...@@ -51,7 +51,7 @@ SSLSessionImpl::~SSLSessionImpl() {
downRef(); downRef();
} }
std::string SSLSessionImpl::serialize(void) const { std::string SSLSessionImpl::serialize() const {
std::string ret; std::string ret;
// Get the length first, then we know how much space to allocate. // Get the length first, then we know how much space to allocate.
......
...@@ -25,9 +25,11 @@ ...@@ -25,9 +25,11 @@
class Exception : public std::exception { class Exception : public std::exception {
public: public:
explicit Exception(const std::string& value) : value_(value) {} explicit Exception(const std::string& value) : value_(value) {}
~Exception(void) noexcept override {} ~Exception() noexcept override {}
const char* what(void) const noexcept override { return value_.c_str(); } const char* what() const noexcept override {
return value_.c_str();
}
private: private:
std::string value_; std::string value_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment