>From 435f257877e2fda2270ff6b38d30ba19d0282093 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 10 Jan 2014 21:29:39 +0100 Subject: [PATCH 1/7] INI: Use static modifier for non public functions Some functions (ini_comment_cb, ini_boundary_cb, is_just_spaces, is_allowed_spaces, parser_run, read_line) weren't declared in public header files and they weren't defined with static modifier. This patch fix it. --- ini/ini_comment.c | 6 +++--- ini/ini_config.c | 12 ++++++------ ini/ini_configobj.c | 14 +++++++------- ini/ini_parse.c | 12 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ini/ini_comment.c b/ini/ini_comment.c index 53a84f8d0779dab391d66fd6b424f1d0454001e6..fc10b4f302042f89b373bb5a6d588bc438a68f70 100644 --- a/ini/ini_comment.c +++ b/ini/ini_comment.c @@ -82,9 +82,9 @@ void ini_comment_destroy(struct ini_comment *ic) /* Cleanup callback */ -void ini_comment_cb(void *elem, - ref_array_del_enum type, - void *data) +static void ini_comment_cb(void *elem, + ref_array_del_enum type, + void *data) { TRACE_FLOW_ENTRY(); diff --git a/ini/ini_config.c b/ini/ini_config.c index c0a908bb516f960db98adbbea962b9542250bb38..d46f2f8ffdfb89abad3c36bbf042ad6f247156da 100644 --- a/ini/ini_config.c +++ b/ini/ini_config.c @@ -36,12 +36,12 @@ /* Temporarily move the parsing function here */ /* THIS FUNCTION WILL BE REMOVED AS SOON AS WE SWITCH TO THE NEW INTERFACE */ /* Reads a line from the file */ -int read_line(FILE *file, - char *buf, - int read_size, - char **key, char **value, - int *length, - int *ext_error) +static int read_line(FILE *file, + char *buf, + int read_size, + char **key, char **value, + int *length, + int *ext_error) { char *res; diff --git a/ini/ini_configobj.c b/ini/ini_configobj.c index 603aaf421147fd0b01d057763b7eb544aafc37d6..8ae5ea707693959770bfb7b8f659c24cf5cfa4ce 100644 --- a/ini/ini_configobj.c +++ b/ini/ini_configobj.c @@ -173,13 +173,13 @@ int ini_config_create(struct ini_cfgobj **ini_config) } /* Callback to set the boundary */ -int ini_boundary_cb(const char *property, - int property_len, - int type, - void *data, - int length, - void *custom_data, - int *dummy) +static int ini_boundary_cb(const char *property, + int property_len, + int type, + void *data, + int length, + void *custom_data, + int *dummy) { int error = EOK; struct value_obj *vo = NULL; diff --git a/ini/ini_parse.c b/ini/ini_parse.c index 78d030e87cd0ef86588e6fd0db1a9e1294c402c2..7792324aaac1652c0c99bbe1f3ea52e9a68669d8 100644 --- a/ini/ini_parse.c +++ b/ini/ini_parse.c @@ -110,7 +110,7 @@ static int save_error(struct collection_item *el, const char *err_txt); -int is_just_spaces(const char *str, uint32_t len) +static int is_just_spaces(const char *str, uint32_t len) { uint32_t i; @@ -132,10 +132,10 @@ int is_just_spaces(const char *str, uint32_t len) * the line is OK too. * Any other character will cause an error. */ -int is_allowed_spaces(const char *str, - uint32_t len, - uint32_t parse_flags, - int *error) +static int is_allowed_spaces(const char *str, + uint32_t len, + uint32_t parse_flags, + int *error) { uint32_t i; int line_ok = 1; @@ -1602,7 +1602,7 @@ static int parser_error(struct parser_obj *po) /* Run parser */ -int parser_run(struct parser_obj *po) +static int parser_run(struct parser_obj *po) { int error = EOK; struct collection_item *item = NULL; -- 1.8.5.3