Removed unused variables + added static keywords
This commit is contained in:
parent
9795d0c5b8
commit
e409f26106
|
@ -23,7 +23,6 @@ static void init_sensors() {
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
SensorSource *source;
|
SensorSource *source;
|
||||||
const SensorInit *data;
|
const SensorInit *data;
|
||||||
gboolean added;
|
|
||||||
guint i = 0;
|
guint i = 0;
|
||||||
|
|
||||||
store = GTK_LIST_STORE(model);
|
store = GTK_LIST_STORE(model);
|
||||||
|
@ -69,7 +68,6 @@ static void set_list_column_value(float num, const gchar *printf_format, GtkTree
|
||||||
|
|
||||||
static gboolean update_data (gpointer data) {
|
static gboolean update_data (gpointer data) {
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
guint number;
|
|
||||||
GSList *node;
|
GSList *node;
|
||||||
SensorSource *source;
|
SensorSource *source;
|
||||||
const SensorInit *sensorData;
|
const SensorInit *sensorData;
|
||||||
|
@ -106,7 +104,6 @@ static gboolean update_data (gpointer data) {
|
||||||
static void add_columns (GtkTreeView *treeview) {
|
static void add_columns (GtkTreeView *treeview) {
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
GtkTreeViewColumn *column;
|
GtkTreeViewColumn *column;
|
||||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
|
||||||
|
|
||||||
// NAME
|
// NAME
|
||||||
renderer = gtk_cell_renderer_text_new ();
|
renderer = gtk_cell_renderer_text_new ();
|
||||||
|
@ -160,7 +157,6 @@ static void about_btn_clicked(GtkButton *button, gpointer user_data) {
|
||||||
|
|
||||||
static void clear_btn_clicked(GtkButton *button, gpointer user_data) {
|
static void clear_btn_clicked(GtkButton *button, gpointer user_data) {
|
||||||
SensorSource *source;
|
SensorSource *source;
|
||||||
const SensorInit *sensorData;
|
|
||||||
|
|
||||||
for (source = sensor_sources; source->drv; source++) {
|
for (source = sensor_sources; source->drv; source++) {
|
||||||
if (!source->enabled)
|
if (!source->enabled)
|
||||||
|
|
16
src/ss/msr.c
16
src/ss/msr.c
|
@ -14,15 +14,15 @@
|
||||||
// AMD PPR = https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf
|
// AMD PPR = https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf
|
||||||
// AMD OSRR = https://developer.amd.com/wp-content/resources/56255_3_03.PDF
|
// AMD OSRR = https://developer.amd.com/wp-content/resources/56255_3_03.PDF
|
||||||
|
|
||||||
guint cores = 0;
|
static guint cores = 0;
|
||||||
gdouble energy_unit = 0;
|
static gdouble energy_unit = 0;
|
||||||
|
|
||||||
gint *msr_files = NULL;
|
static gint *msr_files = NULL;
|
||||||
|
|
||||||
gulong package_eng_b = 0;
|
static gulong package_eng_b = 0;
|
||||||
gulong package_eng_a = 0;
|
static gulong package_eng_a = 0;
|
||||||
gulong *core_eng_b = NULL;
|
static gulong *core_eng_b = NULL;
|
||||||
gulong *core_eng_a = NULL;
|
static gulong *core_eng_a = NULL;
|
||||||
|
|
||||||
gfloat package_power;
|
gfloat package_power;
|
||||||
gfloat package_power_min;
|
gfloat package_power_min;
|
||||||
|
@ -75,7 +75,6 @@ gulong get_core_energy(gint core) {
|
||||||
gboolean msr_init() {
|
gboolean msr_init() {
|
||||||
gshort *cpu_dev_ids = NULL;
|
gshort *cpu_dev_ids = NULL;
|
||||||
int i;
|
int i;
|
||||||
size_t sz;
|
|
||||||
|
|
||||||
if (!check_zen())
|
if (!check_zen())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -111,7 +110,6 @@ gboolean msr_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void msr_update() {
|
void msr_update() {
|
||||||
GSList *list = NULL;
|
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
package_eng_b = get_package_energy();
|
package_eng_b = get_package_energy();
|
||||||
|
|
|
@ -73,7 +73,6 @@ gboolean zenpower_init() {
|
||||||
const gchar *entry;
|
const gchar *entry;
|
||||||
gchar *name = NULL;
|
gchar *name = NULL;
|
||||||
HwmonSensorType *type;
|
HwmonSensorType *type;
|
||||||
HwmonSensor *sensor;
|
|
||||||
|
|
||||||
hwmon = g_dir_open("/sys/class/hwmon", 0, NULL);
|
hwmon = g_dir_open("/sys/class/hwmon", 0, NULL);
|
||||||
if (!hwmon)
|
if (!hwmon)
|
||||||
|
|
Loading…
Reference in a new issue