[master] fc1c056ac signed/unsigned flexelinting
Poul-Henning Kamp
phk at FreeBSD.org
Thu Apr 18 08:55:07 UTC 2019
commit fc1c056ac5b1783005790e198215d1cffb142544
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Apr 18 07:22:51 2019 +0000
signed/unsigned flexelinting
diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index eb6304b14..06d16ee6f 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -44,7 +44,7 @@
struct acl_e {
VTAILQ_ENTRY(acl_e) list;
unsigned char data[ACL_MAXADDR];
- unsigned mask;
+ int mask;
unsigned not;
unsigned para;
char *addr;
@@ -66,7 +66,7 @@ static int
vcl_acl_cmp(struct acl_e *ae1, struct acl_e *ae2)
{
unsigned char *p1, *p2;
- unsigned m;
+ int m;
p1 = ae1->data;
p2 = ae2->data;
@@ -123,7 +123,7 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
aen->data[0] = fam & 0xff;
aen->mask += 8;
- assert(l + 1L <= sizeof aen->data);
+ assert(l + 1UL <= sizeof aen->data);
memcpy(aen->data + 1L, u, l);
VTAILQ_FOREACH(ae2, &tl->acl, list) {
diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h
index 5f9774ed5..ff9fee700 100644
--- a/lib/libvcc/vcc_compile.h
+++ b/lib/libvcc/vcc_compile.h
@@ -140,8 +140,8 @@ struct symbol {
char *name;
unsigned nlen;
- unsigned lorev;
- unsigned hirev;
+ int lorev;
+ int hirev;
struct symbol *parent;
const char *vmod;
@@ -348,8 +348,7 @@ void vcc_stevedore(struct vcc *vcc, const char *stv_name);
/* vcc_symb.c */
void VCC_PrintCName(struct vsb *vsb, const char *b, const char *e);
-struct symbol *VCC_MkSym(struct vcc *tl, const char *b, vcc_kind_t,
- unsigned, unsigned);
+struct symbol *VCC_MkSym(struct vcc *tl, const char *b, vcc_kind_t, int, int);
extern const char XREF_NONE[];
extern const char XREF_DEF[];
extern const char XREF_REF[];
diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index 6ab7defe4..1ff8a4943 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -101,7 +101,7 @@ vcc_new_symbol(struct vcc *tl, const char *b, const char *e)
static struct symbol *
VCC_Symbol(struct vcc *tl, struct symbol *parent,
const char *b, const char *e, vcc_kind_t kind,
- int create, unsigned vlo, unsigned vhi)
+ int create, int vlo, int vhi)
{
const char *q;
struct symbol *sym, *sym2 = NULL;
@@ -275,7 +275,7 @@ VCC_SymbolGet(struct vcc *tl, vcc_kind_t kind, const char *e, const char *x)
struct symbol *
VCC_MkSym(struct vcc *tl, const char *b, vcc_kind_t kind,
- unsigned vlo, unsigned vhi)
+ int vlo, int vhi)
{
struct symbol *sym;
diff --git a/lib/libvcc/vcc_utils.c b/lib/libvcc/vcc_utils.c
index 832e5357f..0e6642552 100644
--- a/lib/libvcc/vcc_utils.c
+++ b/lib/libvcc/vcc_utils.c
@@ -105,7 +105,7 @@ vcc_suckaddr(struct vcc *tl, const char *host, const struct suckaddr *vsa,
const int sz = sizeof(unsigned long long);
const unsigned n = (vsa_suckaddr_len + sz - 1) / sz;
unsigned long long b[n];
- int len;
+ unsigned len;
char *q;
VTCP_name(vsa, a, sizeof a, p, sizeof p);
More information about the varnish-commit
mailing list