Skip to content

Commit

Permalink
Sort out some signed/unsigned mismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Apr 27, 2017
1 parent a7baa5c commit 3d60db6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions include/vapi/vsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ enum VSL_reason_e {

struct VSL_transaction {
unsigned level;
int32_t vxid;
int32_t vxid_parent;
uint32_t vxid;
uint32_t vxid_parent;
enum VSL_transaction_e type;
enum VSL_reason_e reason;
struct VSL_cursor *c;
Expand Down
2 changes: 1 addition & 1 deletion include/vre.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern const unsigned VRE_has_jit;
extern const unsigned VRE_CASELESS;
extern const unsigned VRE_NOTEMPTY;

vre_t *VRE_compile(const char *, int, const char **, int *);
vre_t *VRE_compile(const char *, unsigned, const char **, int *);
int VRE_exec(const vre_t *code, const char *subject, int length,
int startoffset, int options, int *ovector, int ovecsize,
const volatile struct vre_limits *lim);
Expand Down
2 changes: 1 addition & 1 deletion lib/libvarnish/vre.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const unsigned VRE_CASELESS = PCRE_CASELESS;
const unsigned VRE_NOTEMPTY = PCRE_NOTEMPTY;

vre_t *
VRE_compile(const char *pattern, int options,
VRE_compile(const char *pattern, unsigned options,
const char **errptr, int *erroffset)
{
vre_t *v;
Expand Down
2 changes: 1 addition & 1 deletion lib/libvarnishapi/vsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ VSL_PrintTransactions(struct VSL_data *vsl, struct VSL_transaction * const pt[],
else
VSL_PRINT(fo, "%-3.*s ",
(int)(t->level), "***");
VSL_PRINT(fo, "%*.s%-14s %*.s%-10d\n",
VSL_PRINT(fo, "%*.s%-14s %*.s%-10u\n",
verbose ? 10 + 1 : 0, " ",
VSL_transactions[t->type],
verbose ? 1 + 1 : 0, " ",
Expand Down
4 changes: 2 additions & 2 deletions lib/libvarnishapi/vsl_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ vslc_file_delete(const struct VSL_cursor *cursor)
static ssize_t
vslc_file_readn(int fd, void *buf, size_t n)
{
size_t t = 0;
ssize_t t = 0;
ssize_t l;

while (t < n) {
Expand All @@ -335,7 +335,7 @@ vslc_file_next(const struct VSL_cursor *cursor)
{
struct vslc_file *c;
ssize_t i;
size_t l;
ssize_t l;

CAST_OBJ_NOTNULL(c, cursor->priv_data, VSLC_FILE_MAGIC);
assert(&c->cursor == cursor);
Expand Down
8 changes: 4 additions & 4 deletions lib/libvarnishapi/vut.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ VUT_Setup(void)
AZ(VUT.vsm);
AZ(VUT.vslq);

/* Check input arguments */
if ((VUT.n_arg == NULL ? 0 : 1) +
(VUT.N_arg == NULL ? 0 : 1) +
(VUT.r_arg == NULL ? 0 : 1) > 1)
/* Check input arguments (2 used for bug in FlexeLint) */
if ((VUT.n_arg == NULL ? 0 : 2) +
(VUT.N_arg == NULL ? 0 : 2) +
(VUT.r_arg == NULL ? 0 : 2) > 2)
VUT_Error(1, "Only one of -n, -N and -r options may be used");

/* Create and validate the query expression */
Expand Down
2 changes: 1 addition & 1 deletion lib/libvarnishapi/vxp.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct vxp {
struct token *t;

unsigned vex_options;
int vre_options;
unsigned vre_options;

struct vsb *sb;
int err;
Expand Down
2 changes: 1 addition & 1 deletion lib/libvarnishapi/vxp_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ vxp_expr_lhs(struct vxp *vxp, struct vex_lhs **plhs)
}

static void
vxp_expr_num(struct vxp *vxp, struct vex_rhs **prhs, int vxid)
vxp_expr_num(struct vxp *vxp, struct vex_rhs **prhs, unsigned vxid)
{
char *endptr;

Expand Down

0 comments on commit 3d60db6

Please sign in to comment.