Commit cbff1d80 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Argument constification polishing

Helped by: PC-Lint-Plus-RC2
parent 8d4b1eca
......@@ -849,7 +849,7 @@ void Lck_DestroyClass(struct VSC_lck **vsclck);
#include "tbl/locks.h"
/* cache_mempool.c */
void MPL_AssertSane(void *item);
void MPL_AssertSane(const void *item);
struct mempool * MPL_New(const char *name, volatile struct poolparam *pp,
volatile unsigned *cur_size);
void MPL_Destroy(struct mempool **mpp);
......
......@@ -517,7 +517,7 @@ VCA_DestroyPool(struct pool *pp)
/*--------------------------------------------------------------------*/
static void *
static void * __match_proto__()
vca_acct(void *arg)
{
struct listen_sock *ls;
......@@ -573,7 +573,7 @@ vca_acct(void *arg)
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
ccf_start(struct cli *cli, const char * const *av, void *priv)
{
......@@ -586,7 +586,7 @@ ccf_start(struct cli *cli, const char * const *av, void *priv)
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
ccf_listen_address(struct cli *cli, const char * const *av, void *priv)
{
struct listen_sock *ls;
......
......@@ -366,7 +366,7 @@ do_list(struct cli *cli, struct backend *b, void *priv)
return (0);
}
static void
static void __match_proto__(cli_func_t)
cli_backend_list(struct cli *cli, const char * const *av, void *priv)
{
int probes = 0;
......@@ -412,7 +412,7 @@ do_set_health(struct cli *cli, struct backend *b, void *priv)
return (0);
}
static void
static void __match_proto__()
cli_backend_set_health(struct cli *cli, const char * const *av, void *priv)
{
const char *ah;
......
......@@ -616,7 +616,7 @@ BAN_CheckObject(struct worker *wrk, struct objcore *oc, struct req *req)
* CLI functions to add bans
*/
static void
static void __match_proto__(cli_func_t)
ccf_ban(struct cli *cli, const char * const *av, void *priv)
{
int narg, i;
......@@ -705,7 +705,7 @@ ban_render(struct cli *cli, const uint8_t *bs)
}
}
static void
static void __match_proto__(cli_func_t)
ccf_ban_list(struct cli *cli, const char * const *av, void *priv)
{
struct ban *b, *bl;
......
......@@ -223,7 +223,7 @@ VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp, int top)
* Debugging aids
*/
static void
static void __match_proto__(cli_func_t)
debug_fragfetch(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
......
......@@ -154,7 +154,7 @@ VXID_Get(struct worker *wrk, uint32_t mask)
* Dumb down the VXID allocation to make it predictable for
* varnishtest cases
*/
static void
static void __match_proto__(cli_func_t)
cli_debug_xid(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
......
......@@ -337,7 +337,7 @@ MPL_Free(struct mempool *mpl, void *item)
}
void
MPL_AssertSane(void *item)
MPL_AssertSane(const void *item)
{
struct memitem *mi;
mi = (void*)((uintptr_t)item - sizeof(*mi));
......
......@@ -178,7 +178,7 @@ pool_mkpool(unsigned pool_no)
* NB: be maintained for params which require action.
*/
static void *
static void * __match_proto__()
pool_poolherder(void *priv)
{
unsigned nwq;
......
......@@ -202,7 +202,7 @@ VMOD_Panic(struct vsb *vsb)
/*---------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
ccf_debug_vmod(struct cli *cli, const char * const *av, void *priv)
{
struct vmod *v;
......
......@@ -128,7 +128,7 @@ hcb_is_y(uintptr_t u)
}
static uintptr_t
hcb_r_node(struct objhead *n)
hcb_r_node(const struct objhead *n)
{
AZ((uintptr_t)n & (HCB_BIT_NODE | HCB_BIT_Y));
......@@ -145,7 +145,7 @@ hcb_l_node(uintptr_t u)
}
static uintptr_t
hcb_r_y(struct hcb_y *y)
hcb_r_y(const struct hcb_y *y)
{
CHECK_OBJ_NOTNULL(y, HCB_Y_MAGIC);
......@@ -273,7 +273,7 @@ hcb_insert(struct worker *wrk, struct hcb_root *root, const uint8_t *digest,
/*--------------------------------------------------------------------*/
static void
hcb_delete(struct hcb_root *r, struct objhead *oh)
hcb_delete(struct hcb_root *r, const struct objhead *oh)
{
struct hcb_y *y;
volatile uintptr_t *p;
......
......@@ -209,7 +209,7 @@ MCH_Fd_Inherit(int fd, const char *what)
* Listen to stdout+stderr from the child
*/
static int
static int __match_proto__(vlu_f)
child_line(void *priv, const char *p)
{
(void)priv;
......@@ -686,7 +686,7 @@ mch_cli_server_stop(struct cli *cli, const char * const *av, void *priv)
}
}
static void
static void __match_proto__(cli_func_t)
mch_cli_server_status(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
......
......@@ -69,7 +69,7 @@ static const char *secret_file;
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
mcf_banner(struct cli *cli, const char *const *av, void *priv)
{
......@@ -97,7 +97,7 @@ static struct cli_proto cli_proto[] = {
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
mcf_panic(struct cli *cli, const char * const *av, void *priv)
{
......@@ -114,7 +114,7 @@ static struct cli_proto cli_debug[] = {
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(cli_func_t)
mcf_askchild(struct cli *cli, const char * const *av, void *priv)
{
int i;
......@@ -596,7 +596,7 @@ static double M_poll = 0.1;
static VTAILQ_HEAD(,m_addr) m_addr_list =
VTAILQ_HEAD_INITIALIZER(m_addr_list);
static void
static void __match_proto__(mgt_cli_close_f)
Marg_closer(void *priv)
{
......
......@@ -173,7 +173,7 @@ cli_check(const struct cli *cli)
* This function is called when the CLI on stdin is closed.
*/
static void
static void __match_proto__(mgt_cli_close_f)
mgt_stdin_close(void *priv)
{
......@@ -423,7 +423,7 @@ mgt_uptime(const struct vev *e, int what)
/*--------------------------------------------------------------------*/
static void
static void __match_proto__(mgt_cli_close_f)
mgt_I_close(void *priv)
{
(void)priv;
......
......@@ -88,7 +88,7 @@ static struct cli_proto cli_stv[] = {
/*--------------------------------------------------------------------
*/
static void
static void __match_proto__(storage_init_f)
smp_fake_init(struct stevedore *parent, int ac, char * const *av)
{
......
......@@ -72,7 +72,7 @@ static VTAILQ_HEAD(,smp_sc) silos = VTAILQ_HEAD_INITIALIZER(silos);
*/
static int
smp_appendban(struct smp_sc *sc, struct smp_signspace *spc,
smp_appendban(const struct smp_sc *sc, struct smp_signspace *spc,
uint32_t len, const uint8_t *ban)
{
......@@ -135,7 +135,7 @@ smp_banexport(const struct stevedore *stv, const uint8_t *bans, unsigned len)
*/
static int
smp_open_bans(struct smp_sc *sc, struct smp_signspace *spc)
smp_open_bans(const struct smp_sc *sc, struct smp_signspace *spc)
{
uint8_t *ptr, *pe;
int i;
......@@ -630,7 +630,7 @@ debug_report_silo(struct cli *cli, const struct smp_sc *sc)
}
}
static void
static void __match_proto__(cli_func_t)
debug_persistent(struct cli *cli, const char * const * av, void *priv)
{
struct smp_sc *sc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment