add missing static attribute to functions

Functions used only in the file where they are
defined and not exported in any header, should
always defined as static in order to make the scope
clear to the compiler and the developers.

Add the static attribute where missing.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20170811090744.31750-4-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15202.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
Antonio Quartulli 2017-08-11 17:07:42 +08:00 committed by David Sommerseth
parent 280150a02a
commit 72bcdfdc19
No known key found for this signature in database
GPG key ID: 86CF944C9671FDF2
11 changed files with 18 additions and 18 deletions

View file

@ -185,7 +185,7 @@ lz4v2_compress(struct buffer *buf, struct buffer work,
}
}
void
static void
do_lz4_decompress(size_t zlen_max,
struct buffer *work,
struct buffer *buf,

View file

@ -1007,7 +1007,7 @@ process_incoming_link_part2(struct context *c, struct link_socket_info *lsi, con
}
}
void
static void
process_incoming_link(struct context *c)
{
perf_push(PERF_PROC_IN_LINK);

View file

@ -3515,7 +3515,7 @@ management_query_user_pass(struct management *man,
#ifdef MANAGMENT_EXTERNAL_KEY
int
static int
management_query_multiline(struct management *man,
const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)
{
@ -3591,7 +3591,7 @@ done:
return ret;
}
char *
static char *
/* returns allocated base64 signature */
management_query_multiline_flatten_newline(struct management *man,
const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)
@ -3620,7 +3620,7 @@ management_query_multiline_flatten_newline(struct management *man,
return result;
}
char *
static char *
/* returns allocated base64 signature */
management_query_multiline_flatten(struct management *man,
const char *b64_data, const char *prompt, const char *cmd, int *state, struct buffer_list **input)

View file

@ -521,7 +521,7 @@ multi_tcp_dispatch(struct multi_context *m, struct multi_instance *mi, const int
return touched;
}
int
static int
multi_tcp_post(struct multi_context *m, struct multi_instance *mi, const int action)
{
struct context *c = multi_tcp_context(m, mi);

View file

@ -485,7 +485,7 @@ multi_instance_string(const struct multi_instance *mi, bool null, struct gc_aren
}
}
void
static void
generate_prefix(struct multi_instance *mi)
{
struct gc_arena gc = gc_new();
@ -2967,7 +2967,7 @@ gremlin_flood_clients(struct multi_context *m)
}
#endif /* ifdef ENABLE_DEBUG */
bool
static bool
stale_route_check_trigger(struct multi_context *m)
{
struct timeval null;

View file

@ -131,7 +131,7 @@ gen_nonce(unsigned char *nonce)
}
}
void
static void
my_strupr(char *str)
{
/* converts string to uppercase in place */

View file

@ -959,7 +959,7 @@ pull_filter_type_name(int type)
#endif
void
static void
setenv_connection_entry(struct env_set *es,
const struct connection_entry *e,
const int i)
@ -1439,7 +1439,7 @@ rol_check_alloc(struct options *options)
}
}
void
static void
rol6_check_alloc(struct options *options)
{
if (!options->routes_ipv6)
@ -1869,7 +1869,7 @@ parse_http_proxy_override(const char *server,
}
}
void
static void
options_postprocess_http_proxy_override(struct options *o)
{
const struct connection_list *l = o->connection_list;
@ -1986,7 +1986,7 @@ alloc_pull_filter(struct options *o, const int msglevel)
return f;
}
void
static void
connection_entry_load_re(struct connection_entry *ce, const struct remote_entry *re)
{
if (re->remote)

View file

@ -549,7 +549,7 @@ http_proxy_close(struct http_proxy_info *hp)
free(hp);
}
bool
static bool
add_proxy_headers(struct http_proxy_info *p,
socket_descriptor_t sd, /* already open to proxy */
const char *host, /* openvpn server remote */

View file

@ -518,14 +518,14 @@ add_route_ipv6_to_option_list(struct route_ipv6_option_list *l,
l->routes_ipv6 = ro;
}
void
static void
clear_route_list(struct route_list *rl)
{
gc_free(&rl->gc);
CLEAR(*rl);
}
void
static void
clear_route_ipv6_list(struct route_ipv6_list *rl6)
{
gc_free(&rl6->gc);

View file

@ -1431,7 +1431,7 @@ set_actual_address(struct link_socket_actual *actual, struct addrinfo *ai)
}
void
static void
socket_connect(socket_descriptor_t *sd,
const struct sockaddr *dest,
const int connect_timeout,

View file

@ -1607,7 +1607,7 @@ key_source2_print(const struct key_source2 *k)
* @param out Output buffer
* @param olen Length of the output buffer
*/
void
static void
tls1_P_hash(const md_kt_t *md_kt,
const uint8_t *sec,
int sec_len,