diff --git a/.clang-tidy b/.clang-tidy
index d5699b1..da851c0 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -229,6 +229,7 @@
 modernize-make-shared,
 modernize-make-unique,
 modernize-raw-string-literal,
+modernize-redundant-void-arg,
 modernize-replace-auto-ptr,
 modernize-replace-random-shuffle,
 modernize-return-braced-init-list,
diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp
index cfa2147..d6dcdca 100644
--- a/src/ADCSensor.cpp
+++ b/src/ADCSensor.cpp
@@ -94,7 +94,7 @@
     objServer.remove_interface(association);
 }
 
-void ADCSensor::setupRead(void)
+void ADCSensor::setupRead()
 {
     std::shared_ptr<boost::asio::streambuf> buffer =
         std::make_shared<boost::asio::streambuf>();
@@ -225,7 +225,7 @@
     });
 }
 
-void ADCSensor::checkThresholds(void)
+void ADCSensor::checkThresholds()
 {
     if (!readingStateGood())
     {
diff --git a/src/ADCSensor.hpp b/src/ADCSensor.hpp
index 045a65e..81f630d 100644
--- a/src/ADCSensor.hpp
+++ b/src/ADCSensor.hpp
@@ -75,7 +75,7 @@
               const std::string& sensorConfiguration,
               std::optional<BridgeGpio>&& bridgeGpio);
     ~ADCSensor() override;
-    void setupRead(void);
+    void setupRead();
 
   private:
     sdbusplus::asio::object_server& objServer;
@@ -88,5 +88,5 @@
     std::optional<BridgeGpio> bridgeGpio;
     thresholds::ThresholdTimer thresholdTimer;
     void handleResponse(const boost::system::error_code& err);
-    void checkThresholds(void) override;
+    void checkThresholds() override;
 };
diff --git a/src/DeviceMgmt.cpp b/src/DeviceMgmt.cpp
index ffc0376..e8eb875 100644
--- a/src/DeviceMgmt.cpp
+++ b/src/DeviceMgmt.cpp
@@ -49,7 +49,7 @@
     return name.str();
 }
 
-bool I2CDeviceParams::devicePresent(void) const
+bool I2CDeviceParams::devicePresent() const
 {
     fs::path path = i2cBusPath(bus) / deviceDirName(bus, address);
 
@@ -63,7 +63,7 @@
     return fs::exists(path, ec);
 }
 
-bool I2CDeviceParams::deviceStatic(void) const
+bool I2CDeviceParams::deviceStatic() const
 {
     if (!devicePresent())
     {
@@ -91,7 +91,7 @@
     destroy();
 }
 
-int I2CDevice::create(void) const
+int I2CDevice::create() const
 {
     // If it's already instantiated, there's nothing we need to do.
     if (params.devicePresent())
@@ -126,7 +126,7 @@
     return 0;
 }
 
-int I2CDevice::destroy(void) const
+int I2CDevice::destroy() const
 {
     // No params.devicePresent() check on this like in create(), since it
     // might be used to clean up after a device instantiation that was only
diff --git a/src/DeviceMgmt.hpp b/src/DeviceMgmt.hpp
index 5e469de..84ad8a0 100644
--- a/src/DeviceMgmt.hpp
+++ b/src/DeviceMgmt.hpp
@@ -34,8 +34,8 @@
     uint64_t bus;
     uint64_t address;
 
-    bool devicePresent(void) const;
-    bool deviceStatic(void) const;
+    bool devicePresent() const;
+    bool deviceStatic() const;
 };
 
 std::optional<I2CDeviceParams>
@@ -51,8 +51,8 @@
   private:
     I2CDeviceParams params;
 
-    int create(void) const;
-    int destroy(void) const;
+    int create() const;
+    int destroy() const;
 };
 
 // HACK: this declaration "should" live in Utils.hpp, but that leads to a
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index 59180b5..f0c5c59 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -286,7 +286,7 @@
     objServer.remove_interface(pwmLimitIface);
 }
 
-void CFMSensor::createMaxCFMIface(void)
+void CFMSensor::createMaxCFMIface()
 {
     cfmLimitIface->register_property("Limit", c2 * maxCFM * tachs.size());
     cfmLimitIface->initialize();
@@ -318,12 +318,12 @@
         "xyz.openbmc_project.Sensor.Value");
 }
 
-void CFMSensor::checkThresholds(void)
+void CFMSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
 
-void CFMSensor::updateReading(void)
+void CFMSensor::updateReading()
 {
     double val = 0.0;
     if (calculate(val))
@@ -524,7 +524,7 @@
     objServer.remove_interface(association);
 }
 
-void ExitAirTempSensor::setupMatches(void)
+void ExitAirTempSensor::setupMatches()
 {
     constexpr const auto matchTypes{
         std::to_array<const char*>({"power", inletTemperatureSensor})};
@@ -632,7 +632,7 @@
         std::array<const char*, 1>{sensorValueInterface});
 }
 
-void ExitAirTempSensor::updateReading(void)
+void ExitAirTempSensor::updateReading()
 {
     double val = 0.0;
     if (calculate(val))
@@ -646,7 +646,7 @@
     }
 }
 
-double ExitAirTempSensor::getTotalCFM(void)
+double ExitAirTempSensor::getTotalCFM()
 {
     double sum = 0;
     for (auto& sensor : cfmSensors)
@@ -825,7 +825,7 @@
     return true;
 }
 
-void ExitAirTempSensor::checkThresholds(void)
+void ExitAirTempSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
diff --git a/src/ExitAirTempSensor.hpp b/src/ExitAirTempSensor.hpp
index bea8fba..68952ab 100644
--- a/src/ExitAirTempSensor.hpp
+++ b/src/ExitAirTempSensor.hpp
@@ -29,11 +29,11 @@
     ~CFMSensor() override;
 
     bool calculate(double& /*value*/);
-    void updateReading(void);
-    void setupMatches(void);
-    void createMaxCFMIface(void);
+    void updateReading();
+    void setupMatches();
+    void createMaxCFMIface();
     void addTachRanges(const std::string& serviceName, const std::string& path);
-    void checkThresholds(void) override;
+    void checkThresholds() override;
     uint64_t getMaxRpm(uint64_t cfmMax) const;
 
   private:
@@ -65,9 +65,9 @@
                       std::vector<thresholds::Threshold>&& thresholdData);
     ~ExitAirTempSensor() override;
 
-    void checkThresholds(void) override;
-    void updateReading(void);
-    void setupMatches(void);
+    void checkThresholds() override;
+    void updateReading();
+    void setupMatches();
 
   private:
     double lastReading = 0.0;
@@ -78,6 +78,6 @@
 
     sdbusplus::asio::object_server& objServer;
     std::chrono::time_point<std::chrono::steady_clock> lastTime;
-    static double getTotalCFM(void);
+    static double getTotalCFM();
     bool calculate(double& val);
 };
diff --git a/src/ExternalSensor.cpp b/src/ExternalSensor.cpp
index 1717e49..9a7a690 100644
--- a/src/ExternalSensor.cpp
+++ b/src/ExternalSensor.cpp
@@ -114,12 +114,12 @@
     }
 }
 
-void ExternalSensor::checkThresholds(void)
+void ExternalSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
 
-bool ExternalSensor::isAliveAndPerishable(void) const
+bool ExternalSensor::isAliveAndPerishable() const
 {
     return (writeAlive && writePerishable);
 }
@@ -151,7 +151,7 @@
     writeAlive = true;
 }
 
-void ExternalSensor::writeInvalidate(void)
+void ExternalSensor::writeInvalidate()
 {
     writeAlive = false;
 
@@ -182,7 +182,7 @@
     return (writeTimeout - ageElapsed(now));
 }
 
-void ExternalSensor::externalSetTrigger(void)
+void ExternalSensor::externalSetTrigger()
 {
     if constexpr (debug)
     {
diff --git a/src/ExternalSensor.hpp b/src/ExternalSensor.hpp
index 20dd2f0..6f5b3db 100644
--- a/src/ExternalSensor.hpp
+++ b/src/ExternalSensor.hpp
@@ -31,7 +31,7 @@
             writeHookIn);
 
     // Returns true if sensor has external Value that is subject to timeout
-    bool isAliveAndPerishable(void) const;
+    bool isAliveAndPerishable() const;
 
     // Returns true if AliveAndPerishable and timeout has not yet happened
     bool
@@ -41,7 +41,7 @@
     void writeBegin(const std::chrono::steady_clock::time_point& now);
 
     // Marks sensor as timed out, replacing Value with floating-point "NaN"
-    void writeInvalidate(void);
+    void writeInvalidate();
 
     // Returns amount of time elapsed since last writeBegin() happened
     std::chrono::steady_clock::duration
@@ -61,6 +61,6 @@
     std::function<void(const std::chrono::steady_clock::time_point& now)>
         writeHook;
 
-    void checkThresholds(void) override;
-    void externalSetTrigger(void);
+    void checkThresholds() override;
+    void externalSetTrigger();
 };
diff --git a/src/HwmonTempSensor.cpp b/src/HwmonTempSensor.cpp
index c7449d5..dd95c3b 100644
--- a/src/HwmonTempSensor.cpp
+++ b/src/HwmonTempSensor.cpp
@@ -117,7 +117,7 @@
     objServer.remove_interface(association);
 }
 
-void HwmonTempSensor::setupRead(void)
+void HwmonTempSensor::setupRead()
 {
     if (!readingStateGood())
     {
@@ -191,7 +191,7 @@
     restartRead();
 }
 
-void HwmonTempSensor::checkThresholds(void)
+void HwmonTempSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
diff --git a/src/HwmonTempSensor.hpp b/src/HwmonTempSensor.hpp
index d45dafd..7208090 100644
--- a/src/HwmonTempSensor.hpp
+++ b/src/HwmonTempSensor.hpp
@@ -35,11 +35,11 @@
                     PowerState powerState,
                     const std::shared_ptr<I2CDevice>& i2cDevice);
     ~HwmonTempSensor() override;
-    void setupRead(void);
+    void setupRead();
     void activate(const std::string& newPath,
                   const std::shared_ptr<I2CDevice>& newI2CDevice);
-    void deactivate(void);
-    bool isActive(void);
+    void deactivate();
+    bool isActive();
 
     std::shared_ptr<I2CDevice> getI2CDevice() const
     {
@@ -61,5 +61,5 @@
 
     void handleResponse(const boost::system::error_code& err, size_t bytesRead);
     void restartRead();
-    void checkThresholds(void) override;
+    void checkThresholds() override;
 };
diff --git a/src/IntelCPUSensor.cpp b/src/IntelCPUSensor.cpp
index e10b8ea..5bf0fb6 100644
--- a/src/IntelCPUSensor.cpp
+++ b/src/IntelCPUSensor.cpp
@@ -111,7 +111,7 @@
     }
 }
 
-void IntelCPUSensor::restartRead(void)
+void IntelCPUSensor::restartRead()
 {
     std::weak_ptr<IntelCPUSensor> weakRef = weak_from_this();
     waitTimer.expires_after(std::chrono::milliseconds(pollTime));
@@ -130,7 +130,7 @@
     });
 }
 
-void IntelCPUSensor::setupRead(void)
+void IntelCPUSensor::setupRead()
 {
     if (readingStateGood())
     {
@@ -166,7 +166,7 @@
     });
 }
 
-void IntelCPUSensor::updateMinMaxValues(void)
+void IntelCPUSensor::updateMinMaxValues()
 {
     const boost::container::flat_map<
         std::string,
@@ -322,7 +322,7 @@
     restartRead();
 }
 
-void IntelCPUSensor::checkThresholds(void)
+void IntelCPUSensor::checkThresholds()
 {
     if (show)
     {
diff --git a/src/IntelCPUSensor.hpp b/src/IntelCPUSensor.hpp
index 0417c6e..88e6040 100644
--- a/src/IntelCPUSensor.hpp
+++ b/src/IntelCPUSensor.hpp
@@ -34,7 +34,7 @@
     static constexpr unsigned int sensorPollMs = 1000;
     static constexpr size_t warnAfterErrorCount = 10;
     static constexpr const char* labelTcontrol = "Tcontrol";
-    void setupRead(void);
+    void setupRead();
 
   private:
     sdbusplus::asio::object_server& objServer;
@@ -51,9 +51,9 @@
     uint8_t minMaxReadCounter{0};
     int fd{};
     void handleResponse(const boost::system::error_code& err);
-    void checkThresholds(void) override;
-    void updateMinMaxValues(void);
-    void restartRead(void);
+    void checkThresholds() override;
+    void updateMinMaxValues();
+    void restartRead();
 };
 
 extern boost::container::flat_map<std::string, std::shared_ptr<IntelCPUSensor>>
diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
index 3ee8283..519a05b 100644
--- a/src/IpmbSensor.cpp
+++ b/src/IpmbSensor.cpp
@@ -98,7 +98,7 @@
     objectServer.remove_interface(association);
 }
 
-std::string IpmbSensor::getSubTypeUnits(void) const
+std::string IpmbSensor::getSubTypeUnits() const
 {
     switch (subType)
     {
@@ -117,7 +117,7 @@
     }
 }
 
-void IpmbSensor::init(void)
+void IpmbSensor::init()
 {
     loadDefaults();
     setInitialProperties(getSubTypeUnits());
@@ -260,7 +260,7 @@
     }
 }
 
-void IpmbSensor::checkThresholds(void)
+void IpmbSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
@@ -401,7 +401,7 @@
     read();
 }
 
-void IpmbSensor::read(void)
+void IpmbSensor::read()
 {
     waitTimer.expires_after(std::chrono::milliseconds(sensorPollMs));
     waitTimer.async_wait(
diff --git a/src/IpmbSensor.hpp b/src/IpmbSensor.hpp
index 54a2a4a..58f20d5 100644
--- a/src/IpmbSensor.hpp
+++ b/src/IpmbSensor.hpp
@@ -91,12 +91,12 @@
                std::string& sensorTypeName);
     ~IpmbSensor() override;
 
-    void checkThresholds(void) override;
-    void read(void);
-    void init(void);
-    std::string getSubTypeUnits(void) const;
-    void loadDefaults(void);
-    void runInitCmd(void);
+    void checkThresholds() override;
+    void read();
+    void init();
+    std::string getSubTypeUnits() const;
+    void loadDefaults();
+    void runInitCmd();
     bool processReading(const std::vector<uint8_t>& data, double& resp);
     void parseConfigValues(const SensorBaseConfigMap& entry);
     bool sensorClassType(const std::string& sensorClass);
@@ -120,7 +120,7 @@
     ReadingFormat readingFormat = ReadingFormat::byte0;
 
   private:
-    void sendIpmbRequest(void);
+    void sendIpmbRequest();
     sdbusplus::asio::object_server& objectServer;
     boost::asio::steady_timer waitTimer;
     void ipmbRequestCompletionCb(const boost::system::error_code& ec,
diff --git a/src/MCUTempSensor.cpp b/src/MCUTempSensor.cpp
index 8022e8c..fef23e9 100644
--- a/src/MCUTempSensor.cpp
+++ b/src/MCUTempSensor.cpp
@@ -89,13 +89,13 @@
     objectServer.remove_interface(association);
 }
 
-void MCUTempSensor::init(void)
+void MCUTempSensor::init()
 {
     setInitialProperties(sensor_paths::unitDegreesC);
     read();
 }
 
-void MCUTempSensor::checkThresholds(void)
+void MCUTempSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
@@ -150,7 +150,7 @@
     return 0;
 }
 
-void MCUTempSensor::read(void)
+void MCUTempSensor::read()
 {
     static constexpr size_t pollTime = 1; // in seconds
 
diff --git a/src/MCUTempSensor.hpp b/src/MCUTempSensor.hpp
index 4007546..2948af3 100644
--- a/src/MCUTempSensor.hpp
+++ b/src/MCUTempSensor.hpp
@@ -19,9 +19,9 @@
                   uint8_t busId, uint8_t mcuAddress, uint8_t tempReg);
     ~MCUTempSensor() override;
 
-    void checkThresholds(void) override;
-    void read(void);
-    void init(void);
+    void checkThresholds() override;
+    void read();
+    void init();
 
     uint8_t busId;
     uint8_t mcuAddress;
diff --git a/src/NVMeContext.hpp b/src/NVMeContext.hpp
index 14e38a1..4eb81e4 100644
--- a/src/NVMeContext.hpp
+++ b/src/NVMeContext.hpp
@@ -106,4 +106,4 @@
 
 using NVMEMap = boost::container::flat_map<int, std::shared_ptr<NVMeContext>>;
 
-NVMEMap& getNVMEMap(void);
+NVMEMap& getNVMEMap();
diff --git a/src/NVMeSensor.cpp b/src/NVMeSensor.cpp
index f22bf70..9c1b631 100644
--- a/src/NVMeSensor.cpp
+++ b/src/NVMeSensor.cpp
@@ -85,7 +85,7 @@
     return scanDelay == 0;
 }
 
-void NVMeSensor::checkThresholds(void)
+void NVMeSensor::checkThresholds()
 {
     thresholds::checkThresholds(this);
 }
diff --git a/src/NVMeSensor.hpp b/src/NVMeSensor.hpp
index 7f2f114..a7cfba1 100644
--- a/src/NVMeSensor.hpp
+++ b/src/NVMeSensor.hpp
@@ -29,5 +29,5 @@
     sdbusplus::asio::object_server& objServer;
     unsigned int scanDelay{0};
 
-    void checkThresholds(void) override;
+    void checkThresholds() override;
 };
diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
index f8cee21..4f73cec 100644
--- a/src/PSUEvent.cpp
+++ b/src/PSUEvent.cpp
@@ -184,7 +184,7 @@
     inputDev.close();
 }
 
-void PSUSubEvent::setupRead(void)
+void PSUSubEvent::setupRead()
 {
     if (!readingStateGood(readState))
     {
diff --git a/src/PSUEvent.hpp b/src/PSUEvent.hpp
index 4c705a4..d761f45 100644
--- a/src/PSUEvent.hpp
+++ b/src/PSUEvent.hpp
@@ -53,7 +53,7 @@
     std::shared_ptr<std::set<std::string>> asserts;
     std::shared_ptr<std::set<std::string>> combineEvent;
     std::shared_ptr<bool> assertState;
-    void setupRead(void);
+    void setupRead();
 
   private:
     int value = 0;
diff --git a/src/PSUSensor.cpp b/src/PSUSensor.cpp
index 0c763c0..96f849a 100644
--- a/src/PSUSensor.cpp
+++ b/src/PSUSensor.cpp
@@ -134,7 +134,7 @@
     path = "";
 }
 
-void PSUSensor::setupRead(void)
+void PSUSensor::setupRead()
 {
     if (!readingStateGood())
     {
@@ -169,7 +169,7 @@
     });
 }
 
-void PSUSensor::restartRead(void)
+void PSUSensor::restartRead()
 {
     std::weak_ptr<PSUSensor> weakRef = weak_from_this();
     waitTimer.expires_after(std::chrono::milliseconds(sensorPollMs));
@@ -231,7 +231,7 @@
     restartRead();
 }
 
-void PSUSensor::checkThresholds(void)
+void PSUSensor::checkThresholds()
 {
     if (!readingStateGood())
     {
diff --git a/src/PSUSensor.hpp b/src/PSUSensor.hpp
index 69f365b..f9b738f 100644
--- a/src/PSUSensor.hpp
+++ b/src/PSUSensor.hpp
@@ -27,11 +27,11 @@
               const std::string& label, size_t tSize, double pollRate,
               const std::shared_ptr<I2CDevice>& i2cDevice);
     ~PSUSensor() override;
-    void setupRead(void);
+    void setupRead();
     void activate(const std::string& newPath,
                   const std::shared_ptr<I2CDevice>& newI2CDevice);
-    void deactivate(void);
-    bool isActive(void);
+    void deactivate();
+    bool isActive();
 
     std::shared_ptr<I2CDevice> getI2CDevice() const
     {
@@ -53,7 +53,7 @@
     thresholds::ThresholdTimer thresholdTimer;
     void restartRead();
     void handleResponse(const boost::system::error_code& err, size_t bytesRead);
-    void checkThresholds(void) override;
+    void checkThresholds() override;
     unsigned int sensorPollMs = defaultSensorPollMs;
 
     static constexpr size_t warnAfterErrorCount = 10;
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index 89ae913..35610c5 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -1053,7 +1053,7 @@
     getter->getConfiguration(types);
 }
 
-void propertyInitialize(void)
+void propertyInitialize()
 {
     sensorTable = {{"power", sensor_paths::unitWatts},
                    {"curr", sensor_paths::unitAmperes},
diff --git a/src/TachSensor.cpp b/src/TachSensor.cpp
index 7c026b8..0a7048a 100644
--- a/src/TachSensor.cpp
+++ b/src/TachSensor.cpp
@@ -191,7 +191,7 @@
     restartRead(pollTime);
 }
 
-void TachSensor::checkThresholds(void)
+void TachSensor::checkThresholds()
 {
     bool status = thresholds::checkThresholds(this);
 
@@ -253,7 +253,7 @@
     gpioLine.release();
 }
 
-void PresenceSensor::monitorPresence(void)
+void PresenceSensor::monitorPresence()
 {
     gpioFd.async_wait(boost::asio::posix::stream_descriptor::wait_read,
                       [this](const boost::system::error_code& ec) {
@@ -274,7 +274,7 @@
     });
 }
 
-void PresenceSensor::read(void)
+void PresenceSensor::read()
 {
     gpioLine.event_read();
     status = (gpioLine.get_value() != 0);
@@ -289,7 +289,7 @@
     }
 }
 
-bool PresenceSensor::getValue(void) const
+bool PresenceSensor::getValue() const
 {
     return status;
 }
diff --git a/src/TachSensor.hpp b/src/TachSensor.hpp
index b53b5ae..845fbec 100644
--- a/src/TachSensor.hpp
+++ b/src/TachSensor.hpp
@@ -23,9 +23,9 @@
                    boost::asio::io_context& io, const std::string& name);
     ~PresenceSensor();
 
-    void monitorPresence(void);
-    void read(void);
-    bool getValue(void) const;
+    void monitorPresence();
+    void read();
+    bool getValue() const;
 
   private:
     bool status = true;
@@ -96,7 +96,7 @@
 
     void handleResponse(const boost::system::error_code& err, size_t bytesRead);
     void restartRead(size_t pollTime);
-    void checkThresholds(void) override;
+    void checkThresholds() override;
 };
 
 inline void logFanInserted(const std::string& device)
@@ -113,13 +113,13 @@
                device);
 }
 
-inline void logFanRedundancyLost(void)
+inline void logFanRedundancyLost()
 {
     const auto* msg = "OpenBMC.0.1.FanRedundancyLost";
     lg2::error("Fan Inserted", "REDFISH_MESSAGE_ID", msg);
 }
 
-inline void logFanRedundancyRestored(void)
+inline void logFanRedundancyRestored()
 {
     const auto* msg = "OpenBMC.0.1.FanRedundancyRegained";
     lg2::error("Fan Removed", "REDFISH_MESSAGE_ID", msg);
diff --git a/src/Utils.cpp b/src/Utils.cpp
index f109b4d..ca125db 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -282,7 +282,7 @@
     return true;
 }
 
-bool isPowerOn(void)
+bool isPowerOn()
 {
     if (!powerMatch)
     {
@@ -291,7 +291,7 @@
     return powerStatusOn;
 }
 
-bool hasBiosPost(void)
+bool hasBiosPost()
 {
     if (!postMatch)
     {
@@ -300,7 +300,7 @@
     return biosHasPost;
 }
 
-bool isChassisOn(void)
+bool isChassisOn()
 {
     if (!chassisMatch)
     {
diff --git a/src/Utils.hpp b/src/Utils.hpp
index 9652e63..f3e0753 100644
--- a/src/Utils.hpp
+++ b/src/Utils.hpp
@@ -68,9 +68,9 @@
                std::string_view matchString,
                std::vector<std::filesystem::path>& foundPaths,
                int symlinkDepth = 1);
-bool isPowerOn(void);
-bool hasBiosPost(void);
-bool isChassisOn(void);
+bool isPowerOn();
+bool hasBiosPost();
+bool isChassisOn();
 void setupPowerMatchCallback(
     const std::shared_ptr<sdbusplus::asio::connection>& conn,
     std::function<void(PowerState type, bool state)>&& callback);
diff --git a/src/sensor.hpp b/src/sensor.hpp
index b12c01a..7d22160 100644
--- a/src/sensor.hpp
+++ b/src/sensor.hpp
@@ -77,7 +77,7 @@
                             : nullptr)
     {}
     virtual ~Sensor() = default;
-    virtual void checkThresholds(void) = 0;
+    virtual void checkThresholds() = 0;
     std::string name;
     std::string configurationPath;
     std::string configInterface;
