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
db83e59a
Commit
db83e59a
authored
Nov 08, 2019
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
That was just a warning
parent
7ae1bf24
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
vcc_compile.h
lib/libvcc/vcc_compile.h
+1
-0
vcc_token.c
lib/libvcc/vcc_token.c
+10
-0
vcc_utils.c
lib/libvcc/vcc_utils.c
+3
-4
vcc_xref.c
lib/libvcc/vcc_xref.c
+4
-8
No files found.
lib/libvcc/vcc_compile.h
View file @
db83e59a
...
...
@@ -374,6 +374,7 @@ void vcc_Coord(const struct vcc *tl, struct vsb *vsb,
void
vcc_ErrToken
(
const
struct
vcc
*
tl
,
const
struct
token
*
t
);
void
vcc_ErrWhere
(
struct
vcc
*
,
const
struct
token
*
);
void
vcc_ErrWhere2
(
struct
vcc
*
,
const
struct
token
*
,
const
struct
token
*
);
void
vcc_Warn
(
struct
vcc
*
);
void
vcc__Expect
(
struct
vcc
*
tl
,
unsigned
tok
,
unsigned
line
);
int
vcc_IdIs
(
const
struct
token
*
t
,
const
char
*
p
);
...
...
lib/libvcc/vcc_token.c
View file @
db83e59a
...
...
@@ -183,6 +183,16 @@ vcc_markline(const struct vcc *tl, const char *l, const char *le,
VSB_putc
(
tl
->
sb
,
'\n'
);
}
void
vcc_Warn
(
struct
vcc
*
tl
)
{
AN
(
tl
);
AN
(
tl
->
err
);
VSB_cat
(
tl
->
sb
,
"(That was just a warning)
\n
"
);
tl
->
err
=
0
;
}
/*--------------------------------------------------------------------*/
/* XXX: should take first+last token */
...
...
lib/libvcc/vcc_utils.c
View file @
db83e59a
...
...
@@ -281,10 +281,9 @@ Emit_UDS_Path(struct vcc *tl, const struct token *t_path, const char *errid)
VSB_printf
(
tl
->
sb
,
"%s: Cannot stat: %s
\n
"
,
errid
,
strerror
(
errno
));
vcc_ErrWhere
(
tl
,
t_path
);
if
(
err
==
ENOENT
||
err
==
EACCES
)
{
VSB_cat
(
tl
->
sb
,
"(That was just a warning)
\n
"
);
tl
->
err
=
0
;
}
else
if
(
err
==
ENOENT
||
err
==
EACCES
)
vcc_Warn
(
tl
);
else
return
;
}
else
if
(
!
S_ISSOCK
(
st
.
st_mode
))
{
VSB_printf
(
tl
->
sb
,
"%s: Not a socket:
\n
"
,
errid
);
...
...
lib/libvcc/vcc_xref.c
View file @
db83e59a
...
...
@@ -83,10 +83,8 @@ vcc_checkref(struct vcc *tl, const struct symbol *sym)
VSB_printf
(
tl
->
sb
,
"Unused %s %.*s, defined:
\n
"
,
sym
->
kind
->
name
,
PF
(
sym
->
def_b
));
vcc_ErrWhere
(
tl
,
sym
->
def_b
);
if
(
!
tl
->
err_unref
)
{
VSB_cat
(
tl
->
sb
,
"(That was just a warning)
\n
"
);
tl
->
err
=
0
;
}
if
(
!
tl
->
err_unref
)
vcc_Warn
(
tl
);
}
}
...
...
@@ -233,10 +231,8 @@ vcc_checkaction2(struct vcc *tl, const struct symbol *sym)
return
;
VSB_cat
(
tl
->
sb
,
"Function unused
\n
"
);
vcc_ErrWhere
(
tl
,
p
->
name
);
if
(
!
tl
->
err_unref
)
{
VSB_cat
(
tl
->
sb
,
"(That was just a warning)
\n
"
);
tl
->
err
=
0
;
}
if
(
!
tl
->
err_unref
)
vcc_Warn
(
tl
);
}
int
...
...
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