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 {
IPAddressFormatException& operator=(IPAddressFormatException&&) = default;
~IPAddressFormatException() noexcept override {}
const char* what(void) const noexcept override {
const char* what() const noexcept override {
return msg_.c_str();
}
......
......@@ -379,13 +379,15 @@ struct StaticMeta : StaticMetaBase {
#endif
}
static void preFork(void) {
static void preFork() {
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
instance().head_.next = instance().head_.prev = &instance().head_;
ThreadEntry* threadEntry = getThreadEntry();
......
......@@ -50,7 +50,7 @@ class ThreadPoolExecutor : public virtual folly::Executor {
threadFactory_ = std::move(threadFactory);
}
std::shared_ptr<ThreadFactory> getThreadFactory(void) {
std::shared_ptr<ThreadFactory> getThreadFactory() {
return threadFactory_;
}
......
......@@ -36,7 +36,7 @@ using namespace __cxxabiv1;
extern "C" {
StackTraceStack* getExceptionStackTraceStack(void) __attribute__((__weak__));
typedef StackTraceStack* (*GetExceptionStackTraceStackType)(void);
typedef StackTraceStack* (*GetExceptionStackTraceStackType)();
GetExceptionStackTraceStackType getExceptionStackTraceStackFn;
}
......
......@@ -31,8 +31,8 @@ namespace detail {
*/
void dummyCxaThrow(void*, std::type_info*, void (*)(void*)) noexcept;
void dummyCxaBeginCatch(void*) noexcept;
void dummyCxaRethrow(void) noexcept;
void dummyCxaEndCatch(void) noexcept;
void dummyCxaRethrow() noexcept;
void dummyCxaEndCatch() noexcept;
void dummyRethrowException(std::exception_ptr) noexcept;
}
......
......@@ -40,7 +40,7 @@ void installFatalSignalHandler();
* All these fatal callback must be added before calling
* installFatalSignalCallbacks(), below.
*/
typedef void (*SignalCallback)(void);
typedef void (*SignalCallback)();
void addFatalSignalCallback(SignalCallback callback);
/**
......
......@@ -184,7 +184,7 @@ static BIO_METHOD* getSSLBioMethod() {
return instance;
}
void* initsslBioMethod(void) {
void* initsslBioMethod() {
auto sslBioMethod = getSSLBioMethod();
// override the bwrite method for MSG_EOR support
OpenSSLUtils::setCustomBioWriteMethod(sslBioMethod, AsyncSSLSocket::bioWrite);
......
......@@ -22,7 +22,7 @@
// OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different
// from the compile-time version
struct OpenSSLVersionFinder {
static std::string getOpenSSLLongVersion(void) {
static std::string getOpenSSLLongVersion() {
#ifdef OPENSSL_VERSION_TEXT
return SSLeay_version(SSLEAY_VERSION);
#elif defined(OPENSSL_VERSION_NUMBER)
......@@ -32,7 +32,7 @@ struct OpenSSLVersionFinder {
#endif
}
uint64_t getOpenSSLNumericVersion(void) {
uint64_t getOpenSSLNumericVersion() {
#ifdef OPENSSL_VERSION_NUMBER
return SSLeay();
#else
......
......@@ -51,7 +51,7 @@ SSLSessionImpl::~SSLSessionImpl() {
downRef();
}
std::string SSLSessionImpl::serialize(void) const {
std::string SSLSessionImpl::serialize() const {
std::string ret;
// Get the length first, then we know how much space to allocate.
......
......@@ -25,9 +25,11 @@
class Exception : public std::exception {
public:
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:
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