fix: clan 16 warnings
This commit is contained in:
parent
1a743eba88
commit
b50d7c759d
5 changed files with 14 additions and 20 deletions
|
@ -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;
|
||||
|
||||
|
|
10
src/mbpfan.h
10
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)));
|
||||
|
||||
/**
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#define __USE_MISC
|
||||
#define _GNU_SOURCE
|
||||
#include <syslog.h>
|
||||
|
||||
#include "global.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
|
Loading…
Reference in a new issue