Finish stricter flexelinting

parent 9e65958f
......@@ -3,3 +3,6 @@ ACLOCAL_AMFLAGS = -I m4 -I @VARNISHAPI_DATAROOTDIR@/aclocal
DISTCHECK_CONFIGURE_FLAGS = RST2MAN=:
SUBDIRS = src
flint:
@$(MAKE) -C src flint
......@@ -119,4 +119,7 @@ dist_man_MANS = \
.PHONY: flint
flint:
bash flint.sh
flexelint -I/tmp/include/varnish -I .. \
-I$(VARNISHSRC)/bin/varnishd \
flint.lnt \
`ls *.c | grep -Ev "^tus_blob_stub.c"`
......@@ -28,6 +28,10 @@
-emacro(774, REPLACE) // 'if' always evaluates to False
-emacro(747, ALLOC_OBJ)
-efunc(663, tus_obj*, tus_body_assign) // suspicious array oc->stobj
-esym(763, tus_tus_server)
//unprotected access to constants
-esym(459, H_*, digest_*, vrt_null_strands, hashes, vmod_*, lck_fcore)
// not fully understood
-efunc(413, *_VSPLAY_NEXT)
......
#!/bin/sh
if [ "x$1" = "x-ok" -a -f _.fl ] ; then
echo "Saved as reference"
mv _.fl _.fl.old
exit 0
fi
if [ "x${VARNISHSRC}" = "x" ] ; then
echo >&2 VARNISHSRC needs to point to varnish-cache sources
exit 9
fi
flexelint \
-D__FLEXELINT__ \
${VARNISHSRC}/flint.lnt \
flint.lnt \
-zero \
-I.. \
-I${VARNISHSRC}/include \
-I${VARNISHSRC}/bin/varnishd \
-I${VARNISHSRC}/lib/libvgz \
$(ls *.c | grep -v _stub) \
2>&1 | tee _.fl
if [ -f _.fl.old ] ; then
diff -u _.fl.old _.fl
fi
if [ "x$1" = "x-ok" ] ; then
echo "Saved as reference"
mv _.fl _.fl.old
fi
......@@ -52,6 +52,7 @@ avoid_compiler_warnings(void) {
}
static const struct Vmod_vmod_blob_Func *vmod_blob = NULL;
//lint -esym(459, vmod_blobdigest) unprotected access
static const struct Vmod_vmod_blobdigest_Func *vmod_blobdigest = NULL;
static void *dl_vmod_blob = NULL;
static void *dl_vmod_blobdigest = NULL;
......@@ -97,6 +98,7 @@ load_vmod(const struct vmod_data *data, void **hdl, const void **func)
#define HENUM(t, b) static struct vmod_blobdigest_digest *digest_ ## t = NULL;
#include "tbl_hash_enum.h"
//lint -esym(459, enabled) unprotected access
static unsigned enabled = 0;
static char *hashes = NULL;
......
......@@ -53,6 +53,7 @@ VSPLAY_GENERATE(tus_files, tus_file_core, entry, tus_file_cmp)
#define TUS_FILE_RAND 16
#define TUS_FILE_SUFF "_XXXXXX"
//lint -esym(459, header_size) unprotected access
static uintmax_t header_size;
static unsigned tus_file_srvref(struct tus_file_core *);
static unsigned tus_file_unref(struct tus_file_core *);
......
......@@ -39,7 +39,6 @@
#include <vcl.h>
#include <vrt_obj.h>
//lint -esym(763, tus_tus_server)
#include "vcc_tus_if.h"
#include "tus_file.h"
......@@ -94,6 +93,7 @@ tus_fini(VRT_CTX, struct vmod_priv *priv)
return (tus_chksum_fini(ctx));
}
//lint -sem(tus_event, thread_protected) varnish-cache ensures
int
tus_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
......@@ -246,6 +246,7 @@ tus_server_ref(VRT_CTX, struct VPFX(tus_server) *tussrv,
return (NULL);
}
//lint -sem(tus_server__init, thread_protected) varnish-cache ensures
VCL_VOID
tus_server__init(VRT_CTX, struct VPFX(tus_server) **tussrvp,
const char *vcl_name, struct VARGS(server__init) *args)
......@@ -293,6 +294,7 @@ tus_server__init(VRT_CTX, struct VPFX(tus_server) **tussrvp,
return;
}
//lint -sem(tus_server__fini, thread_protected) varnish-cache ensures
VCL_VOID
tus_server__fini(struct VPFX(tus_server) **tussrvp)
{
......
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