From: phk Date: Wed, 30 Jan 2008 10:08:42 +0000 (+0000) Subject: Flexelint silencing: constification, mark ignored returnvalues etc. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48daf8cc79e6a7b0e1cdd50babc4d02a20561c2e;p=varnish Flexelint silencing: constification, mark ignored returnvalues etc. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2406 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/include/cli_common.h b/varnish-cache/include/cli_common.h index 2ef3ed01..3de1ea99 100644 --- a/varnish-cache/include/cli_common.h +++ b/varnish-cache/include/cli_common.h @@ -34,7 +34,7 @@ struct cli { enum cli_status_e result; }; -int cli_writeres(int fd, struct cli *cli); +int cli_writeres(int fd, const struct cli *cli); int cli_readres(int fd, unsigned *status, char **ptr, double tmo); extern struct cli_proto CLI_cmds[]; diff --git a/varnish-cache/include/cli_priv.h b/varnish-cache/include/cli_priv.h index 0cc1fd6c..bf815eb8 100644 --- a/varnish-cache/include/cli_priv.h +++ b/varnish-cache/include/cli_priv.h @@ -53,7 +53,7 @@ struct cli_proto { }; /* The implementation must provide these functions */ -void cli_out(struct cli *cli, const char *fmt, ...); +void cli_out(const struct cli *cli, const char *fmt, ...); void cli_param(struct cli *cli); void cli_result(struct cli *cli, unsigned r); diff --git a/varnish-cache/lib/libvarnish/cli_common.c b/varnish-cache/lib/libvarnish/cli_common.c index 69fa3702..5bff6214 100644 --- a/varnish-cache/lib/libvarnish/cli_common.c +++ b/varnish-cache/lib/libvarnish/cli_common.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -47,20 +46,22 @@ #include "vsb.h" +#include "libvarnish.h" + #include "cli.h" #include "cli_priv.h" #include "cli_common.h" void -cli_out(struct cli *cli, const char *fmt, ...) +cli_out(const struct cli *cli, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (cli != NULL) - vsb_vprintf(cli->sb, fmt, ap); + (void)vsb_vprintf(cli->sb, fmt, ap); else - vfprintf(stdout, fmt, ap); + (void)vfprintf(stdout, fmt, ap); va_end(ap); } @@ -84,7 +85,7 @@ cli_param(struct cli *cli) } int -cli_writeres(int fd, struct cli *cli) +cli_writeres(int fd, const struct cli *cli) { int i, l; struct iovec iov[3];