From: Andre Noll Date: Tue, 21 Jul 2009 23:43:25 +0000 (+0200) Subject: Make some functions/variables static. X-Git-Tag: v0.4.0~44 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=8d76c430e774231a6494d36babb0f63a3cabb893;p=paraslash.git Make some functions/variables static. Found by sparse. --- diff --git a/aft.c b/aft.c index a112abe7..39e94a94 100644 --- a/aft.c +++ b/aft.c @@ -238,7 +238,7 @@ enum audio_file_table_columns { * * \sa osl_compare_func, uint32_compare(). */ -int aft_hash_compare(const struct osl_object *obj1, const struct osl_object *obj2) +static int aft_hash_compare(const struct osl_object *obj1, const struct osl_object *obj2) { return hash_compare((HASH_TYPE *)obj1->data, (HASH_TYPE *)obj2->data); } @@ -475,7 +475,7 @@ int aft_get_row_of_path(const char *path, struct osl_row **row) * * \return Standard. */ -int aft_get_row_of_hash(HASH_TYPE *hash, struct osl_row **row) +static int aft_get_row_of_hash(HASH_TYPE *hash, struct osl_row **row) { const struct osl_object obj = {.data = hash, .size = HASH_SIZE}; return osl(osl_get_row(audio_file_table, AFTCOL_HASH, &obj, row)); @@ -503,7 +503,7 @@ int get_afsi_object_of_row(const struct osl_row *row, struct osl_object *obj) * * \return Positive on success, negative on errors. */ -int get_afsi_object_of_path(const char *path, struct osl_object *obj) +static int get_afsi_object_of_path(const char *path, struct osl_object *obj) { struct osl_row *row; int ret = aft_get_row_of_path(path, &row); @@ -2435,7 +2435,7 @@ int com_cpsi(struct rc4_context *rc4c, int argc, char * const * const argv) return ret; } -void afs_stat_callback(int fd, const struct osl_object *query) +static void afs_stat_callback(int fd, const struct osl_object *query) { int *parser_friendly = query->data; char *buf = *parser_friendly? diff --git a/attribute.c b/attribute.c index cfb7dde0..d9458987 100644 --- a/attribute.c +++ b/attribute.c @@ -565,7 +565,7 @@ err: * * \sa osl_close_table(). */ -void attribute_close(void) +static void attribute_close(void) { osl_close_table(attribute_table, OSL_MARK_CLEAN); attribute_table = NULL; diff --git a/audioc.c b/audioc.c index 81e5d1c5..fa1768b5 100644 --- a/audioc.c +++ b/audioc.c @@ -19,8 +19,8 @@ INIT_AUDIOC_ERRLISTS; -/** the gengetopt structure containing command line args */ -struct audioc_args_info conf; +/** The gengetopt structure containing command line args. */ +static struct audioc_args_info conf; static int loglevel; INIT_STDERR_LOGGING(loglevel); diff --git a/fade.c b/fade.c index aa7997eb..868ada41 100644 --- a/fade.c +++ b/fade.c @@ -25,7 +25,7 @@ #include "error.h" INIT_FADE_ERRLISTS; -struct fade_args_info conf; +static struct fade_args_info conf; __printf_2_3 void para_log(__a_unused int ll, const char *fmt, ...) { diff --git a/grab_client.c b/grab_client.c index 67db5057..d1ef43f9 100644 --- a/grab_client.c +++ b/grab_client.c @@ -27,7 +27,7 @@ #include "fd.h" /** Grab clients that are not yet attached to a filter node. */ -struct list_head inactive_grab_client_list; +static struct list_head inactive_grab_client_list; static int max_num_filters(void) { diff --git a/gui.c b/gui.c index 394b69fe..b37f8fbd 100644 --- a/gui.c +++ b/gui.c @@ -45,7 +45,7 @@ struct rb_entry { size_t len; int color; }; -struct ringbuffer *bot_win_rb; +static struct ringbuffer *bot_win_rb; #define NUM_LINES(len) (1 + (len) / bot.cols) static unsigned scroll_position; @@ -91,8 +91,8 @@ struct stat_item { static struct gui_theme theme; -int _argc; -char **_argv; +static int _argc; +static char **_argv; static void com_help(void); static void com_reread_conf(void); @@ -110,7 +110,7 @@ static void com_scroll_down(void); static void com_page_up(void); static void com_page_down(void); -struct gui_command command_list[] = { +static struct gui_command command_list[] = { { .key = "?", .name = "help", diff --git a/mm.c b/mm.c index 885b6307..ead20681 100644 --- a/mm.c +++ b/mm.c @@ -32,7 +32,7 @@ enum mood_comparator_id {MOOD_COMPARATORS NUM_MOOD_COMPARATORS}; #undef MC #define MC(a, b) # b, -const char const *mood_comparators[] = {MOOD_COMPARATORS}; +static const char const *mood_comparators[] = {MOOD_COMPARATORS}; #undef MC static int parse_mood_comparator(const char *word) diff --git a/mood.c b/mood.c index f3ce9e0a..b5047d37 100644 --- a/mood.c +++ b/mood.c @@ -35,7 +35,7 @@ struct afs_statistics { /** Number of admissible files */ unsigned num; }; -struct afs_statistics statistics; +static struct afs_statistics statistics; /** * Each line of the current mood corresponds to a mood_item. diff --git a/recv.c b/recv.c index d01dab68..9d6f0283 100644 --- a/recv.c +++ b/recv.c @@ -21,8 +21,8 @@ #include "error.h" #include "stdout.h" -/** the gengetopt args info struct */ -struct recv_args_info conf; +/** The gengetopt args info struct. */ +static struct recv_args_info conf; static int loglevel; /** Always log to stderr. */