Commit 95b8eccd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

More Flexelintery

parent 2818d34f
......@@ -37,6 +37,4 @@
-emacro(702, WEXITSTATUS) // signed shift right
-e726 // Extraneous comma ignored
-e825 // control flows into case/default without -fallthrough comment
......@@ -115,9 +115,7 @@
-e455 // thread lock
-e458 // unprotected read
-e716 // while(1) ...
-e717 // do ... while(1) ...
-e785 // Too few initializers for aggregate
-e850 // for loop index variable '___' whose type category is '___'
// is modified in body of the for loop that began at '___'
......
......@@ -4,9 +4,6 @@
-esym(763, sess) // Redundant declaration for symbol 'sess'
-esym(763, cli) // Redundant declaration for symbol 'cli'
-e785 // Too few initializers for aggregate '___' of type '___'
-esym(750, VCL_RET_*) // not ref
-esym(750, VCL_MET_*) // not ref
......
......@@ -130,7 +130,7 @@ static const struct profile profiles[] = {
static const struct profile *active_profile;
volatile sig_atomic_t quit = 0;
static volatile sig_atomic_t quit = 0;
static void
update(void)
......
......@@ -78,11 +78,11 @@ HIS_OPT_p
#define HIS_CLIENT "client"
#define HIS_BACKEND "backend"
#define HIS_NO_PREFIX ""
#define HIS_PROF(name,cb,tag,prefix,field,hist_low,high_high,doc) \
#define HIS_PROF(name,cb,tg,prefix,fld,hist_low,high_high,doc) \
VOPT("P:", "[-P " name "]", \
"Predefined " cb " profile", \
"Predefined " cb " profile: " doc \
" (field " #field " of " #tag " " prefix " VSL tag)." \
" (field " #fld " of " #tg " " prefix " VSL tag)." \
)
#include "varnishhist_profiles.h"
#undef HIS_NO_PREFIX
......
......@@ -2,7 +2,6 @@
-e747 // 16 Info 747 Significant prototype coercion (___) ___ to ___
-e763 // Redundant declaration for symbol '...' previously declared
-e716 // while(1) ...
-efile(451, "varnishlog_options.h")
......
......@@ -4,9 +4,6 @@
-efile(451, "varnishncsa_options.h")
-e763 // Redundant declaration for symbol '...' previously declared
-e726 // Extraneous comma ignored
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
// cache_vcl.c
-e641 // Converting enum 'cli_status_e' to int
......
......@@ -70,7 +70,6 @@
static const char progname[] = "varnishncsa";
struct format;
struct fragment;
enum e_frag {
F_H, /* %H Proto */
......
......@@ -9,7 +9,6 @@
-e747 // 16 Info 747 Significant prototype coercion (___) ___ to ___
-e763 // Redundant declaration for symbol '...' previously declared
-e716 // while(1) ...
-e457 // unprotected write access
-e459 // unprotected access
......
......@@ -20,7 +20,6 @@
-e679 // Suspicious Truncation in arithmetic expression combining with pointer
-e763 // Redundant declaration for symbol '...' previously declared
-e716 // while(1) ...
-e457 // unprotected write access
-e459 // unprotected access
......
......@@ -51,7 +51,6 @@
#include "vnum.h"
#include "vqueue.h"
#include "vrnd.h"
#include "vsa.h"
#include "vss.h"
#include "vsub.h"
#include "vtcp.h"
......
......@@ -50,7 +50,6 @@
#include "vapi/vsm.h"
#include "vcli.h"
#include "vre.h"
#include "vss.h"
#include "vsub.h"
#include "vtcp.h"
#include "vtim.h"
......
......@@ -3,7 +3,6 @@
-e747 // 16 Info 747 Significant prototype coercion (___) ___ to ___
-e763 // Redundant declaration for symbol '...' previously declared
-e716 // while(1) ...
-e457 // unprotected write access
-e459 // unprotected access
......
......@@ -78,7 +78,7 @@ static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
static int f_flag = 0;
static unsigned maxfieldlen = 0;
volatile sig_atomic_t quit = 0;
static volatile sig_atomic_t quit = 0;
static VRB_HEAD(t_order, top) h_order = VRB_INITIALIZER(&h_order);
static VRB_HEAD(t_key, top) h_key = VRB_INITIALIZER(&h_key);
......
......@@ -19,10 +19,12 @@
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e641 // Converting enum '...' to int
-e716 // while(1) ...
-e726 // Extraneous comma ignored
-e728 // Symbol ... not explicitly initialized
-e763 // Redundant declaration for symbol '...' previously declared
-e777 // Testing floats for equality
-e785 // Too few initializers for aggregate
-e786 // String concatenation within initializer
-esym(818, argv) // Pointer parameter '...' could be declared as pointing to const
......@@ -121,10 +123,19 @@
-emacro(740, VTAILQ_LAST) // Unusual pointer cast (incompatible indirect types)
-emacro(740, VTAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
-esym(754, "*::vtqh_first") // local struct member '...' not referenced
///////////////////////////////////////////////////////////////////////
// <vdef.h>
-emacro(527, NEEDLESS) // unreachable code
///////////////////////////////////////////////////////////////////////
// <libvarnishapi>
-esym(765, vsl_vbm_bitclr)
-esym(765, vsl_vbm_bitset)
-esym(765, vsm_diag)
///////////////////////////////////////////////////////////////////////
// It is ok to default after handling a few select SLT_* tags
......
......@@ -26,9 +26,6 @@
-ffc // No automatic custody
-e763 // Redundant declaration for symbol '...' previously declared
-e726 // Extraneous comma ignored
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
-esym(534, sprintf) // Ignoring return value of function
-esym(534, asprintf) // Ignoring return value of function
......
......@@ -68,7 +68,7 @@ varnish_daemon(int nochdir, int noclose)
int osa_ok;
/* A SIGHUP may be thrown when the parent exits below. */
sigemptyset(&sa.sa_mask);
AZ(sigemptyset(&sa.sa_mask));
sa.sa_handler = SIG_IGN;
sa.sa_flags = 0;
osa_ok = sigaction(SIGHUP, &sa, &osa);
......@@ -89,7 +89,7 @@ varnish_daemon(int nochdir, int noclose)
newgrp = setsid();
oerrno = errno;
if (osa_ok != -1)
sigaction(SIGHUP, &osa, NULL);
AZ(sigaction(SIGHUP, &osa, NULL));
if (newgrp == -1) {
errno = oerrno;
......
......@@ -378,7 +378,7 @@ vsc_filter_pt_list(struct VSM_data *vd)
VSB_printf(vsb, "%s.",
pt->point.section->ident);
VSB_printf(vsb, "%s", pt->point.desc->name);
VSB_finish(vsb);
AZ(VSB_finish(vsb));
if (fnmatch(sf->pattern, VSB_data(vsb), 0))
continue;
VTAILQ_REMOVE(&vsc->pt_list, pt, list);
......
......@@ -418,7 +418,7 @@ VSL_WriteOpen(struct VSL_data *vsl, const char *name, int append, int unbuf)
if (0 == ftell(f)) {
if (fwrite(head, 1, sizeof head, f) != sizeof head) {
vsl_diag(vsl, "%s", strerror(errno));
fclose(f);
(void)fclose(f);
return (NULL);
}
}
......
......@@ -32,8 +32,7 @@
#define VSL_FILE_ID "VSL"
/*lint -esym(534, vsl_diag) */
int vsl_diag(struct VSL_data *vsl, const char *fmt, ...)
__v_printflike(2, 3);
int vsl_diag(struct VSL_data *vsl, const char *fmt, ...) __v_printflike(2, 3);
void vsl_vbm_bitset(int bit, void *priv);
void vsl_vbm_bitclr(int bit, void *priv);
......
......@@ -26,7 +26,6 @@
-esym(534, vsb_vprintf) // Ignoring return value of function
-esym(534, memset) // Ignoring return value of function
-e788 // enum constant 'HND_Unclass' not used within defaulted switch
-e716 // while(1) ...
-e732 // Loss of sign (arg. no. 2) (int to unsigned int)
-emacro(835, EXPR_VAR) // // Info 835: A zero has been given as right argument to operator '<<'
......
......@@ -209,7 +209,7 @@ sharddir_delete(struct sharddir **sharddp)
FREE_OBJ(shardd);
}
void
static void
sharddir_rdlock(struct sharddir *shardd)
{
CHECK_OBJ_NOTNULL(shardd, SHARDDIR_MAGIC);
......
......@@ -105,7 +105,6 @@ void sharddir_debug(struct sharddir *shardd, const uint32_t flags);
void sharddir_err(VRT_CTX, enum VSL_tag_e tag, const char *fmt, ...);
void sharddir_new(struct sharddir **sharddp, const char *vcl_name);
void sharddir_delete(struct sharddir **sharddp);
void sharddir_rdlock(struct sharddir *shardd);
void sharddir_wrlock(struct sharddir *shardd);
void sharddir_unlock(struct sharddir *shardd);
VCL_BACKEND sharddir_pick_be(VRT_CTX, struct sharddir *, uint32_t, VCL_INT,
......
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