Skip to content

Commit

Permalink
fix some minor compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatare committed Oct 15, 2024
1 parent ce185d7 commit c406d14
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/hwmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ vector<string> HwmonInterface<HwmonT>::find_files(const string &path, const vect
}

template<>
string HwmonInterface<SensorDriver>::filename(int index)
string HwmonInterface<SensorDriver>::filename(unsigned int index)
{ return "temp" + std::to_string(index) + "_input"; }

template<>
string HwmonInterface<FanDriver>::filename(int index)
string HwmonInterface<FanDriver>::filename(unsigned int index)
{ return "pwm" + std::to_string(index); }


Expand Down
2 changes: 1 addition & 1 deletion src/hwmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class HwmonInterface {

private:
static vector<string> find_files(const string &path, const vector<unsigned int> &indices);
static string filename(int index);
static string filename(unsigned int index);

static vector<string> find_hwmons_by_model(const string &path, const string &model, unsigned char depth);
static vector<string> find_hwmons_by_name(const string &path, const string &name, unsigned char depth);
Expand Down
2 changes: 1 addition & 1 deletion src/libsensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LibsensorsInterface
};

LibsensorsInterface();
friend InitGuard;
friend class InitGuard;


static void initialize_lm_sensors();
Expand Down
2 changes: 1 addition & 1 deletion src/sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class LMSensorsDriver : public SensorDriver {
opt<vector<int>> correction = nullopt,
opt<unsigned int> max_errors = nullopt
);
virtual ~LMSensorsDriver();
virtual ~LMSensorsDriver() override;

const string &chip_name() const;
const vector<string> &feature_names() const;
Expand Down
2 changes: 1 addition & 1 deletion src/thinkfan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ seconds sleeptime(5);
seconds tmp_sleeptime = sleeptime;
float bias_level(0);
float depulse = 0;
TemperatureState temp_state(0);
static TemperatureState temp_state(0);
std::atomic<unsigned char> tolerate_errors(0);

std::condition_variable sleep_cond;
Expand Down
2 changes: 1 addition & 1 deletion src/wtf_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class wtf_ptr : public shared_ptr<unique_ptr<T>>, public std::enable_shared_from
using shared_ptr<unique_ptr<T>>::shared_ptr;

template<typename T1>
wtf_ptr<T>(wtf_ptr<T1> &&ptr)
wtf_ptr(wtf_ptr<T1> &&ptr)
: shared_ptr<unique_ptr<T>>(new unique_ptr<T>(ptr.release()))
{}

Expand Down

0 comments on commit c406d14

Please sign in to comment.