Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d088c084
Commit
d088c084
authored
Mar 24, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Appease some compiler warnings we use (yet).
parent
ac0b20c4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
9 deletions
+22
-9
esi_parse_fuzzer.c
bin/varnishd/fuzzers/esi_parse_fuzzer.c
+2
-0
c00057.vtc
bin/varnishtest/tests/c00057.vtc
+1
-1
vbh.c
lib/libvarnish/vbh.c
+1
-1
vcc_acl.c
lib/libvcc/vcc_acl.c
+5
-1
vcc_compile.c
lib/libvcc/vcc_compile.c
+3
-2
vcc_compile.h
lib/libvcc/vcc_compile.h
+1
-1
vcc_token.c
lib/libvcc/vcc_token.c
+4
-2
vcc_xref.c
lib/libvcc/vcc_xref.c
+1
-1
vmod_debug.c
vmod/vmod_debug.c
+4
-0
No files found.
bin/varnishd/fuzzers/esi_parse_fuzzer.c
View file @
d088c084
...
...
@@ -46,7 +46,9 @@
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
,
size_t
);
extern
struct
VSC_main
*
VSC_C_main
;
struct
VSC_main
*
VSC_C_main
;
extern
struct
params
*
cache_param
;
struct
params
*
cache_param
;
void
...
...
bin/varnishtest/tests/c00057.vtc
View file @
d088c084
...
...
@@ -23,7 +23,7 @@ static void _accessor(volatile char *p) {
p[0] = 'V'; p[1] = '\0';
fprintf(stderr, "%p %s\n", p, p);
}
void (*accessor)(volatile char *p) = _accessor;
static
void (*accessor)(volatile char *p) = _accessor;
}C
sub vcl_recv { C{
...
...
lib/libvarnish/vbh.c
View file @
d088c084
...
...
@@ -495,7 +495,7 @@ struct foo {
#define N 131101
/* Number of items */
#define R -1
/* Random modulus */
struct
foo
*
ff
[
N
];
st
atic
st
ruct
foo
*
ff
[
N
];
static
int
v_matchproto_
(
vbh_cmp_t
)
cmp
(
void
*
priv
,
const
void
*
a
,
const
void
*
b
)
...
...
lib/libvcc/vcc_acl.c
View file @
d088c084
...
...
@@ -530,11 +530,15 @@ vcc_acl_emit(struct vcc *tl, const char *name, const char *rname)
Fh
(
tl
,
0
,
"
\t
return (0);
\n
}
\n
"
);
/* Emit the struct that will be referenced */
Fh
(
tl
,
0
,
"
\n
const struct vrt_acl %s[] = {{
\n
"
,
rname
);
Fh
(
tl
,
0
,
"
\n
static
const struct vrt_acl %s[] = {{
\n
"
,
rname
);
Fh
(
tl
,
0
,
"
\t
.magic = VRT_ACL_MAGIC,
\n
"
);
Fh
(
tl
,
0
,
"
\t
.match = &%s,
\n
"
,
VSB_data
(
func
));
Fh
(
tl
,
0
,
"
\t
.name =
\"
%s
\"
,
\n
"
,
name
);
Fh
(
tl
,
0
,
"}};
\n\n
"
);
if
(
!
tl
->
err_unref
)
{
AN
(
ifp
);
VSB_printf
(
ifp
->
ini
,
"
\t
(void)%s;
\n
"
,
rname
);
}
VSB_destroy
(
&
func
);
}
...
...
lib/libvcc/vcc_compile.c
View file @
d088c084
...
...
@@ -199,8 +199,9 @@ vcc_EmitProc(struct vcc *tl, struct proc *p)
nsub
=
tl
->
nsub
++
;
Fh
(
tl
,
1
,
"vcl_func_f %s;
\n
"
,
VSB_data
(
p
->
cname
));
Fh
(
tl
,
1
,
"const struct vcl_sub sub_%s[1] = {{
\n
"
,
VSB_data
(
p
->
cname
));
Fh
(
tl
,
1
,
"extern const struct vcl_sub sub_%s[1];
\n
"
,
VSB_data
(
p
->
cname
));
Fh
(
tl
,
1
,
"const struct vcl_sub sub_%s[1] = {{
\n
"
,
VSB_data
(
p
->
cname
));
Fh
(
tl
,
1
,
"
\t
.magic
\t\t
= VCL_SUB_MAGIC,
\n
"
);
Fh
(
tl
,
1
,
"
\t
.methods
\t
= 0x%x,
\n
"
,
p
->
okmask
);
Fh
(
tl
,
1
,
"
\t
.name
\t\t
=
\"
%.*s
\"
,
\n
"
,
PF
(
p
->
name
));
...
...
lib/libvcc/vcc_compile.h
View file @
d088c084
...
...
@@ -461,4 +461,4 @@ const char *vcc_MarkPriv(struct vcc *, struct procprivhead *,
#define SkipToken(a, b) \
do { vcc__Expect(a, b, __LINE__); ERRCHK(a); vcc_NextToken(a); } while (0)
#define ACL_SYMBOL_PREFIX "vrt_acl
_named
"
#define ACL_SYMBOL_PREFIX "vrt_acl"
lib/libvcc/vcc_token.c
View file @
d088c084
...
...
@@ -541,7 +541,8 @@ vcc_Lexer(struct vcc *tl, const struct source *sp, int eoi)
AZ
(
VSB_finish
(
vsb
));
bprintf
(
namebuf
,
"blob_%u"
,
tl
->
unique
++
);
Fh
(
tl
,
0
,
"
\n
const unsigned char %s_data[%zd] = {
\n
"
,
Fh
(
tl
,
0
,
"
\n
static const unsigned char %s_data[%zd] = {
\n
"
,
namebuf
,
VSB_len
(
vsb
));
for
(
u
=
0
;
u
<
VSB_len
(
vsb
);
u
++
)
{
Fh
(
tl
,
0
,
"
\t
0x%02x,"
,
VSB_data
(
vsb
)[
u
]
&
0xff
);
...
...
@@ -551,7 +552,8 @@ vcc_Lexer(struct vcc *tl, const struct source *sp, int eoi)
if
((
u
&
7
)
!=
7
)
Fh
(
tl
,
0
,
"
\n
"
);
Fh
(
tl
,
0
,
"};
\n
"
);
Fh
(
tl
,
0
,
"
\n
const struct vrt_blob %s[1] = {{
\n
"
,
Fh
(
tl
,
0
,
"
\n
static const struct vrt_blob %s[1] = {{
\n
"
,
namebuf
);
Fh
(
tl
,
0
,
"
\t
.len =
\t
%zd,
\n
"
,
VSB_len
(
vsb
));
Fh
(
tl
,
0
,
"
\t
.blob =
\t
%s_data,
\n
"
,
namebuf
);
...
...
lib/libvcc/vcc_xref.c
View file @
d088c084
...
...
@@ -411,7 +411,7 @@ vcc_instance_info(struct vcc *tl, const struct symbol *sym)
void
VCC_InstanceInfo
(
struct
vcc
*
tl
)
{
Fc
(
tl
,
0
,
"
\n
const struct vpi_ii VGC_instance_info[] = {
\n
"
);
Fc
(
tl
,
0
,
"
\n
static
const struct vpi_ii VGC_instance_info[] = {
\n
"
);
VCC_WalkSymbols
(
tl
,
vcc_instance_info
,
SYM_MAIN
,
SYM_INSTANCE
);
Fc
(
tl
,
0
,
"
\t
{ .p = NULL, .name =
\"\"
}
\n
"
);
Fc
(
tl
,
0
,
"};
\n
"
);
...
...
vmod/vmod_debug.c
View file @
d088c084
...
...
@@ -1052,12 +1052,14 @@ xyzzy_get_ip(VRT_CTX)
//lint -save -e9075 external symbol '...' defined without a prior declaration
extern
const
struct
vmod_data
Vmod_wrong0_Data
;
const
struct
vmod_data
Vmod_wrong0_Data
=
{
.
vrt_major
=
0
,
.
vrt_minor
=
0
,
};
//lint -save -e835 A zero has been given as left argument to operatorp'+'
extern
const
struct
vmod_data
Vmod_wrong1_Data
;
const
struct
vmod_data
Vmod_wrong1_Data
=
{
.
vrt_major
=
VRT_MAJOR_VERSION
,
.
vrt_minor
=
VRT_MINOR_VERSION
+
1
,
...
...
@@ -1068,6 +1070,7 @@ static const struct foo {
int
bar
;
}
foo_struct
[
1
];
extern
const
struct
vmod_data
Vmod_wrong2_Data
;
const
struct
vmod_data
Vmod_wrong2_Data
=
{
.
vrt_major
=
VRT_MAJOR_VERSION
,
.
vrt_minor
=
VRT_MINOR_VERSION
,
...
...
@@ -1078,6 +1081,7 @@ const struct vmod_data Vmod_wrong2_Data = {
.
proto
=
"blablabla"
,
};
extern
const
struct
vmod_data
Vmod_wrong3_Data
;
const
struct
vmod_data
Vmod_wrong3_Data
=
{
.
vrt_major
=
VRT_MAJOR_VERSION
,
.
vrt_minor
=
VRT_MINOR_VERSION
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment