From 6b0078ad8c23819104e8617549aeb726443c76ef Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 28 Jun 2007 08:58:25 +0000 Subject: [PATCH] Add missing static markers. Delete needless forward declarations. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4504 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/sensors/chips.c | 18 +++++++----------- prog/sensors/main.c | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index abf858f4..594dc09c 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -29,14 +29,10 @@ #include "lib/error.h" #include "kernel/include/sensors.h" -static void print_label(const char *label, int space); -static void print_temp_info(float, float, float, int, int, int); -static inline float deg_ctof( float ); - extern int fahrenheit; extern char degstr[5]; -inline float deg_ctof( float cel ) +static inline float deg_ctof(float cel) { return ( cel * ( 9.0F / 5.0F ) + 32.0F ); } @@ -50,8 +46,8 @@ inline float deg_ctof( float cel ) /* minmax = 0 for limit/hysteresis, 1 for max/min, 2 for max only; curprec and limitprec are # of digits after decimal point for the current temp and the limits */ -void print_temp_info(float n_cur, float n_over, float n_hyst, - int minmax, int curprec, int limitprec) +static void print_temp_info(float n_cur, float n_over, float n_hyst, + int minmax, int curprec, int limitprec) { if (fahrenheit) { n_cur = deg_ctof(n_cur); @@ -90,7 +86,7 @@ void print_temp_info(float n_cur, float n_over, float n_hyst, printf("Unknown temperature mode!"); } -void print_label(const char *label, int space) +static void print_label(const char *label, int space) { int len=strlen(label)+1; if (len > space) @@ -99,8 +95,8 @@ void print_label(const char *label, int space) printf("%s:%*s", label, space - len, ""); } -int sensors_get_label_and_valid(sensors_chip_name name, int feature, char **label, - int *valid) +static int sensors_get_label_and_valid(sensors_chip_name name, int feature, + char **label, int *valid) { int err; err = sensors_get_label(name,feature,label); @@ -113,7 +109,7 @@ int sensors_get_label_and_valid(sensors_chip_name name, int feature, char **labe return err; } -void print_vid_info(const sensors_chip_name *name, int f_vid, int f_vrm) +static void print_vid_info(const sensors_chip_name *name, int f_vid, int f_vrm) { char *label; int valid; diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 9fd9a52e..6f080775 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -324,7 +324,7 @@ struct match { void (*fn) (const sensors_chip_name *name); }; -struct match matches[] = { +static struct match matches[] = { { "ds1621", print_ds1621 }, { "lm75", print_lm75 }, { "adm1021", print_adm1021 },