Removed unused variables + added static keywords
This commit is contained in:
parent
9795d0c5b8
commit
e409f26106
3 changed files with 8 additions and 15 deletions
|
@ -23,7 +23,6 @@ static void init_sensors() {
|
|||
GtkListStore *store;
|
||||
SensorSource *source;
|
||||
const SensorInit *data;
|
||||
gboolean added;
|
||||
guint i = 0;
|
||||
|
||||
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) {
|
||||
GtkTreeIter iter;
|
||||
guint number;
|
||||
GSList *node;
|
||||
SensorSource *source;
|
||||
const SensorInit *sensorData;
|
||||
|
@ -106,7 +104,6 @@ static gboolean update_data (gpointer data) {
|
|||
static void add_columns (GtkTreeView *treeview) {
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||
|
||||
// NAME
|
||||
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) {
|
||||
SensorSource *source;
|
||||
const SensorInit *sensorData;
|
||||
|
||||
for (source = sensor_sources; source->drv; source++) {
|
||||
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 OSRR = https://developer.amd.com/wp-content/resources/56255_3_03.PDF
|
||||
|
||||
guint cores = 0;
|
||||
gdouble energy_unit = 0;
|
||||
static guint cores = 0;
|
||||
static gdouble energy_unit = 0;
|
||||
|
||||
gint *msr_files = NULL;
|
||||
static gint *msr_files = NULL;
|
||||
|
||||
gulong package_eng_b = 0;
|
||||
gulong package_eng_a = 0;
|
||||
gulong *core_eng_b = NULL;
|
||||
gulong *core_eng_a = NULL;
|
||||
static gulong package_eng_b = 0;
|
||||
static gulong package_eng_a = 0;
|
||||
static gulong *core_eng_b = NULL;
|
||||
static gulong *core_eng_a = NULL;
|
||||
|
||||
gfloat package_power;
|
||||
gfloat package_power_min;
|
||||
|
@ -75,7 +75,6 @@ gulong get_core_energy(gint core) {
|
|||
gboolean msr_init() {
|
||||
gshort *cpu_dev_ids = NULL;
|
||||
int i;
|
||||
size_t sz;
|
||||
|
||||
if (!check_zen())
|
||||
return FALSE;
|
||||
|
@ -111,7 +110,6 @@ gboolean msr_init() {
|
|||
}
|
||||
|
||||
void msr_update() {
|
||||
GSList *list = NULL;
|
||||
gint i;
|
||||
|
||||
package_eng_b = get_package_energy();
|
||||
|
|
|
@ -73,7 +73,6 @@ gboolean zenpower_init() {
|
|||
const gchar *entry;
|
||||
gchar *name = NULL;
|
||||
HwmonSensorType *type;
|
||||
HwmonSensor *sensor;
|
||||
|
||||
hwmon = g_dir_open("/sys/class/hwmon", 0, NULL);
|
||||
if (!hwmon)
|
||||
|
|
Loading…
Reference in a new issue