aboutsummaryrefslogtreecommitdiff
path: root/src/ss
diff options
context:
space:
mode:
authorOndrej Čerman2019-10-12 21:46:51 +0200
committerOndrej Čerman2019-10-12 21:46:51 +0200
commit2a912ed3055593613e1c36add99e156bb105f863 (patch)
tree04405235160dcfabe94e6d160ce1e498e0f1d86a /src/ss
parent43fb7cb8da5331037d81eeb905860ecec958a456 (diff)
Updated makefile + fixed warnings
Diffstat (limited to 'src/ss')
-rw-r--r--src/ss/msr.c8
-rw-r--r--src/ss/os.c10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/ss/msr.c b/src/ss/msr.c
index 0c77a6a..c3a0224 100644
--- a/src/ss/msr.c
+++ b/src/ss/msr.c
@@ -76,7 +76,7 @@ gulong get_core_energy(gint core) {
gboolean msr_init() {
gshort *cpu_dev_ids = NULL;
- int i;
+ guint i;
if (!check_zen())
return FALSE;
@@ -112,7 +112,7 @@ gboolean msr_init() {
}
void msr_update() {
- gint i;
+ guint i;
package_eng_b = get_package_energy();
for (i = 0; i < cores; i++) {
@@ -142,7 +142,7 @@ void msr_update() {
}
void msr_clear_minmax() {
- gint i;
+ guint i;
package_power_min = package_power;
package_power_max = package_power;
@@ -155,7 +155,7 @@ void msr_clear_minmax() {
GSList* msr_get_sensors() {
GSList *list = NULL;
SensorInit *data;
- gint i;
+ guint i;
data = sensor_init_new();
data->label = g_strdup("Package Power");
diff --git a/src/ss/os.c b/src/ss/os.c
index d232a1f..9b25a04 100644
--- a/src/ss/os.c
+++ b/src/ss/os.c
@@ -1,4 +1,6 @@
#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
#include "zenmonitor.h"
#include "sysfs.h"
#include "os.h"
@@ -22,7 +24,7 @@ static gdouble get_frequency(guint coreid) {
gboolean os_init() {
gshort *cpu_dev_ids = NULL;
- gint i;
+ guint i;
if (!check_zen())
return FALSE;
@@ -52,7 +54,7 @@ gboolean os_init() {
}
void os_update() {
- gint i;
+ guint i;
for (i = 0; i < cores; i++) {
core_freq[i] = get_frequency(i);
@@ -64,7 +66,7 @@ void os_update() {
}
void os_clear_minmax() {
- gint i;
+ guint i;
for (i = 0; i < cores; i++) {
core_freq_min[i] = core_freq[i];
@@ -75,7 +77,7 @@ void os_clear_minmax() {
GSList* os_get_sensors() {
GSList *list = NULL;
SensorInit *data;
- gint i;
+ guint i;
for (i = 0; i < cores; i++) {
data = sensor_init_new();