diff --git a/src/global.h b/src/global.h
index 363d0c9..42b87bc 100644
--- a/src/global.h
+++ b/src/global.h
@@ -30,6 +30,8 @@ struct s_fans {
struct s_fans *next;
};
+/** Represents a Temperature sensor
+ */
typedef struct s_sensors t_sensors;
typedef struct s_fans t_fans;
diff --git a/src/mbpfan.h b/src/mbpfan.h
index d93c6d2..e09d562 100644
--- a/src/mbpfan.h
+++ b/src/mbpfan.h
@@ -19,6 +19,8 @@
#include <stdbool.h>
+#include "global.h"
+
/** Temperature Thresholds
* low_temp - temperature below which fan speed will be at minimum
* high_temp - fan will increase speed when higher than this temperature
@@ -32,14 +34,6 @@ extern int max_temp;
*/
extern int polling_interval;
-/** Represents a Temperature sensor
- */
-struct s_sensors;
-typedef struct s_sensors t_sensors;
-
-struct s_fans;
-typedef struct s_fans t_fans;
-
char *smprintf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
/**
diff --git a/src/strmap.c b/src/strmap.c
index cdbe6ff..f7d7dcc 100644
--- a/src/strmap.c
+++ b/src/strmap.c
@@ -284,7 +284,6 @@ int sm_get_count(const StrMap *map)
unsigned int i, j, n, m;
unsigned int count;
Bucket *bucket;
- Pair *pair;
if (map == NULL) {
return 0;
@@ -296,13 +295,11 @@ int sm_get_count(const StrMap *map)
count = 0;
while (i < n) {
- pair = bucket->pairs;
m = bucket->count;
j = 0;
while (j < m) {
count++;
- pair++;
j++;
}
diff --git a/tests/minunit.h b/tests/minunit.h
index c1ab00b..ba99383 100644
--- a/tests/minunit.h
+++ b/tests/minunit.h
@@ -12,16 +12,16 @@
extern int tests_run;
-static const char *test_sensor_paths();
-static const char *test_fan_paths();
-static const char *test_get_temp();
-static const char *test_config_file();
-static const char *test_settings();
+static const char *test_sensor_paths(void);
+static const char *test_fan_paths(void);
+static const char *test_get_temp(void);
+static const char *test_config_file(void);
+static const char *test_settings(void);
static void handler(int signal);
-static const char *test_sighup_receive();
-static const char *test_settings_reload();
-static const char *all_tests();
+static const char *test_sighup_receive(void);
+static const char *test_settings_reload(void);
+static const char *all_tests(void);
-int tests();
+int tests(const char *program_path);
-#endif
\ No newline at end of file
+#endif
Fix clang 16 warnings
e88d29ed4b09d01e6b8d7a45645b0d4e66c6a664
Andrew Gaul <andrew@gaul.org> · 2023-08-03T23:41 ·
browse files at this commit
parents:
98d68c1