mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
BUILD: address a few cases of "static <type> inline foo()"
Older compilers don't like to see "inline" placed after the type in a function declaration, it must be "static inline <type>" only. This patch touches various areas. The warnings were seen with gcc-3.4.
This commit is contained in:
parent
3212a2c438
commit
0e492e2ad0
@ -58,7 +58,7 @@ static inline int be_usable_srv(struct proxy *be)
|
||||
}
|
||||
|
||||
/* set the time of last session on the backend */
|
||||
static void inline be_set_sess_last(struct proxy *be)
|
||||
static inline void be_set_sess_last(struct proxy *be)
|
||||
{
|
||||
be->be_counters.last_sess = now.tv_sec;
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ static inline void proxy_reset_timeouts(struct proxy *proxy)
|
||||
}
|
||||
|
||||
/* increase the number of cumulated connections received on the designated frontend */
|
||||
static void inline proxy_inc_fe_conn_ctr(struct listener *l, struct proxy *fe)
|
||||
static inline void proxy_inc_fe_conn_ctr(struct listener *l, struct proxy *fe)
|
||||
{
|
||||
_HA_ATOMIC_ADD(&fe->fe_counters.cum_conn, 1);
|
||||
if (l->counters)
|
||||
@ -129,7 +129,7 @@ static void inline proxy_inc_fe_conn_ctr(struct listener *l, struct proxy *fe)
|
||||
}
|
||||
|
||||
/* increase the number of cumulated connections accepted by the designated frontend */
|
||||
static void inline proxy_inc_fe_sess_ctr(struct listener *l, struct proxy *fe)
|
||||
static inline void proxy_inc_fe_sess_ctr(struct listener *l, struct proxy *fe)
|
||||
{
|
||||
|
||||
_HA_ATOMIC_ADD(&fe->fe_counters.cum_sess, 1);
|
||||
@ -140,7 +140,7 @@ static void inline proxy_inc_fe_sess_ctr(struct listener *l, struct proxy *fe)
|
||||
}
|
||||
|
||||
/* increase the number of cumulated connections on the designated backend */
|
||||
static void inline proxy_inc_be_ctr(struct proxy *be)
|
||||
static inline void proxy_inc_be_ctr(struct proxy *be)
|
||||
{
|
||||
_HA_ATOMIC_ADD(&be->be_counters.cum_conn, 1);
|
||||
HA_ATOMIC_UPDATE_MAX(&be->be_counters.sps_max,
|
||||
@ -148,7 +148,7 @@ static void inline proxy_inc_be_ctr(struct proxy *be)
|
||||
}
|
||||
|
||||
/* increase the number of cumulated requests on the designated frontend */
|
||||
static void inline proxy_inc_fe_req_ctr(struct proxy *fe)
|
||||
static inline void proxy_inc_fe_req_ctr(struct proxy *fe)
|
||||
{
|
||||
_HA_ATOMIC_ADD(&fe->fe_counters.p.http.cum_req, 1);
|
||||
HA_ATOMIC_UPDATE_MAX(&fe->fe_counters.p.http.rps_max,
|
||||
|
||||
@ -69,7 +69,7 @@ struct task *srv_cleanup_idle_connections(struct task *task, void *ctx, unsigned
|
||||
struct task *srv_cleanup_toremove_connections(struct task *task, void *context, unsigned short state);
|
||||
|
||||
/* increase the number of cumulated connections on the designated server */
|
||||
static void inline srv_inc_sess_ctr(struct server *s)
|
||||
static inline void srv_inc_sess_ctr(struct server *s)
|
||||
{
|
||||
_HA_ATOMIC_ADD(&s->counters.cum_sess, 1);
|
||||
HA_ATOMIC_UPDATE_MAX(&s->counters.sps_max,
|
||||
@ -77,7 +77,7 @@ static void inline srv_inc_sess_ctr(struct server *s)
|
||||
}
|
||||
|
||||
/* set the time of last session on the designated server */
|
||||
static void inline srv_set_sess_last(struct server *s)
|
||||
static inline void srv_set_sess_last(struct server *s)
|
||||
{
|
||||
s->counters.last_sess = now.tv_sec;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ static inline void stream_track_stkctr(struct stkctr *ctr, struct stktable *t, s
|
||||
}
|
||||
|
||||
/* Increase the number of cumulated HTTP requests in the tracked counters */
|
||||
static void inline stream_inc_http_req_ctr(struct stream *s)
|
||||
static inline void stream_inc_http_req_ctr(struct stream *s)
|
||||
{
|
||||
struct stksess *ts;
|
||||
void *ptr;
|
||||
@ -240,7 +240,7 @@ static void inline stream_inc_http_req_ctr(struct stream *s)
|
||||
/* Increase the number of cumulated HTTP requests in the backend's tracked
|
||||
* counters. We don't look up the session since it cannot happen in the bakcend.
|
||||
*/
|
||||
static void inline stream_inc_be_http_req_ctr(struct stream *s)
|
||||
static inline void stream_inc_be_http_req_ctr(struct stream *s)
|
||||
{
|
||||
struct stksess *ts;
|
||||
void *ptr;
|
||||
@ -280,7 +280,7 @@ static void inline stream_inc_be_http_req_ctr(struct stream *s)
|
||||
* Note that even 404 are interesting because they're generally caused by
|
||||
* vulnerability scans.
|
||||
*/
|
||||
static void inline stream_inc_http_err_ctr(struct stream *s)
|
||||
static inline void stream_inc_http_err_ctr(struct stream *s)
|
||||
{
|
||||
struct stksess *ts;
|
||||
void *ptr;
|
||||
@ -315,20 +315,20 @@ static void inline stream_inc_http_err_ctr(struct stream *s)
|
||||
}
|
||||
}
|
||||
|
||||
static void inline __stream_add_srv_conn(struct stream *sess, struct server *srv)
|
||||
static inline void __stream_add_srv_conn(struct stream *sess, struct server *srv)
|
||||
{
|
||||
sess->srv_conn = srv;
|
||||
LIST_ADD(&srv->actconns, &sess->by_srv);
|
||||
}
|
||||
|
||||
static void inline stream_add_srv_conn(struct stream *sess, struct server *srv)
|
||||
static inline void stream_add_srv_conn(struct stream *sess, struct server *srv)
|
||||
{
|
||||
HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
|
||||
__stream_add_srv_conn(sess, srv);
|
||||
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
|
||||
}
|
||||
|
||||
static void inline stream_del_srv_conn(struct stream *sess)
|
||||
static inline void stream_del_srv_conn(struct stream *sess)
|
||||
{
|
||||
struct server *srv = sess->srv_conn;
|
||||
|
||||
@ -341,7 +341,7 @@ static void inline stream_del_srv_conn(struct stream *sess)
|
||||
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
|
||||
}
|
||||
|
||||
static void inline stream_init_srv_conn(struct stream *sess)
|
||||
static inline void stream_init_srv_conn(struct stream *sess)
|
||||
{
|
||||
sess->srv_conn = NULL;
|
||||
LIST_INIT(&sess->by_srv);
|
||||
|
||||
@ -71,7 +71,7 @@ struct pipe *get_pipe()
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void inline __kill_pipe(struct pipe *p)
|
||||
static inline void __kill_pipe(struct pipe *p)
|
||||
{
|
||||
close(p->prod);
|
||||
close(p->cons);
|
||||
|
||||
@ -531,7 +531,7 @@ static int srv_parse_no_check_send_proxy(char **args, int *cur_arg,
|
||||
}
|
||||
|
||||
/* Disable server PROXY protocol flags. */
|
||||
static int inline srv_disable_pp_flags(struct server *srv, unsigned int flags)
|
||||
static inline int srv_disable_pp_flags(struct server *srv, unsigned int flags)
|
||||
{
|
||||
srv->pp_opts &= ~flags;
|
||||
return 0;
|
||||
@ -560,7 +560,7 @@ static int srv_parse_non_stick(char **args, int *cur_arg,
|
||||
}
|
||||
|
||||
/* Enable server PROXY protocol flags. */
|
||||
static int inline srv_enable_pp_flags(struct server *srv, unsigned int flags)
|
||||
static inline int srv_enable_pp_flags(struct server *srv, unsigned int flags)
|
||||
{
|
||||
srv->pp_opts |= flags;
|
||||
return 0;
|
||||
|
||||
@ -521,7 +521,7 @@ static void ssl_async_fd_free(int fd)
|
||||
* function used to manage a returned SSL_ERROR_WANT_ASYNC
|
||||
* and enable/disable polling for async fds
|
||||
*/
|
||||
static void inline ssl_async_process_fds(struct connection *conn, SSL *ssl)
|
||||
static inline void ssl_async_process_fds(struct connection *conn, SSL *ssl)
|
||||
{
|
||||
OSSL_ASYNC_FD add_fd[32];
|
||||
OSSL_ASYNC_FD del_fd[32];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user