Commit 1ea0ffd2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Flexelint silencing: a (), a couple of const and cast.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2410 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f77552fd
...@@ -69,11 +69,11 @@ int vsb_vprintf(struct vsb *, const char *, va_list) /* __printflike(2, 0) */; ...@@ -69,11 +69,11 @@ int vsb_vprintf(struct vsb *, const char *, va_list) /* __printflike(2, 0) */;
#endif #endif
int vsb_putc(struct vsb *, int); int vsb_putc(struct vsb *, int);
int vsb_trim(struct vsb *); int vsb_trim(struct vsb *);
int vsb_overflowed(struct vsb *); int vsb_overflowed(const struct vsb *);
void vsb_finish(struct vsb *); void vsb_finish(struct vsb *);
char *vsb_data(struct vsb *); char *vsb_data(struct vsb *);
int vsb_len(struct vsb *); int vsb_len(struct vsb *);
int vsb_done(struct vsb *); int vsb_done(const struct vsb *);
void vsb_delete(struct vsb *); void vsb_delete(struct vsb *);
#ifdef __cplusplus #ifdef __cplusplus
}; };
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#define VSB_ISFINISHED(s) ((s)->s_flags & VSB_FINISHED) #define VSB_ISFINISHED(s) ((s)->s_flags & VSB_FINISHED)
#define VSB_HASOVERFLOWED(s) ((s)->s_flags & VSB_OVERFLOWED) #define VSB_HASOVERFLOWED(s) ((s)->s_flags & VSB_OVERFLOWED)
#define VSB_HASROOM(s) ((s)->s_len < (s)->s_size - 1) #define VSB_HASROOM(s) ((s)->s_len < (s)->s_size - 1)
#define VSB_FREESPACE(s) ((s)->s_size - (s)->s_len - 1) #define VSB_FREESPACE(s) ((s)->s_size - ((s)->s_len + 1))
#define VSB_CANEXTEND(s) ((s)->s_flags & VSB_AUTOEXTEND) #define VSB_CANEXTEND(s) ((s)->s_flags & VSB_AUTOEXTEND)
/* /*
...@@ -373,7 +373,7 @@ vsb_putc(struct vsb *s, int c) ...@@ -373,7 +373,7 @@ vsb_putc(struct vsb *s, int c)
return (-1); return (-1);
} }
if (c != '\0') if (c != '\0')
s->s_buf[s->s_len++] = c; s->s_buf[s->s_len++] = (char)c;
return (0); return (0);
} }
...@@ -399,7 +399,7 @@ vsb_trim(struct vsb *s) ...@@ -399,7 +399,7 @@ vsb_trim(struct vsb *s)
* Check if an vsb overflowed * Check if an vsb overflowed
*/ */
int int
vsb_overflowed(struct vsb *s) vsb_overflowed(const struct vsb *s)
{ {
return VSB_HASOVERFLOWED(s); return VSB_HASOVERFLOWED(s);
} }
...@@ -467,7 +467,7 @@ vsb_delete(struct vsb *s) ...@@ -467,7 +467,7 @@ vsb_delete(struct vsb *s)
* Check if an vsb has been finished. * Check if an vsb has been finished.
*/ */
int int
vsb_done(struct vsb *s) vsb_done(const struct vsb *s)
{ {
return(VSB_ISFINISHED(s)); return(VSB_ISFINISHED(s));
......
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