Commit 4a9c1fdc authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

More Flexelintery

parent 5060e910
......@@ -1023,7 +1023,7 @@ handle_keypress(int ch)
break;
case 'G':
current = n_ptarray - 1;
page_start = current - l_points + 1;
page_start = (current - l_points) + 1;
break;
case 'v':
verbosity++;
......
......@@ -491,7 +491,7 @@ ip_magic(void)
* XXX: "localhost", but that doesn't work out of the box.
* XXX: Things like "prefer_ipv6" parameter complicates things.
*/
fd = VSS_resolver("127.0.0.1", NULL, &bind_cb, NULL, &p);
fd = VSS_resolver("127.0.0.1", NULL, bind_cb, NULL, &p);
assert(fd >= 0);
VTCP_myname(fd, abuf, sizeof abuf, pbuf, sizeof(pbuf));
extmacro_def("localhost", "%s", abuf);
......
......@@ -203,10 +203,10 @@ update(int p)
n++;
AC(erase());
if (end_of_file)
AC(mvprintw(0, COLS - 1 - strlen(VUT.name) - 5, "%s (EOF)",
AC(mvprintw(0, (COLS - strlen(VUT.name)) - (1 + 6), "%s (EOF)",
VUT.name));
else
AC(mvprintw(0, COLS - 1 - strlen(VUT.name), "%s", VUT.name));
AC(mvprintw(0, (COLS - strlen(VUT.name)) - 1, "%s", VUT.name));
AC(mvprintw(0, 0, "list length %u", ntop));
for (tp = VRB_MIN(t_order, &h_order); tp != NULL; tp = tp2) {
tp2 = VRB_NEXT(t_order, &h_order, tp);
......@@ -308,6 +308,7 @@ dump(void)
}
}
//lint -sem(usage, r_no)
static void __attribute__((__noreturn__))
usage(int status)
{
......@@ -366,7 +367,7 @@ main(int argc, char **argv)
exit(1);
}
}
VUT.dispatch_f = &accumulate;
VUT.dispatch_f = accumulate;
VUT.dispatch_priv = NULL;
VUT.sighup_f = sighup;
VUT_Main();
......
......@@ -60,6 +60,7 @@
// ignore retval
-esym(534, printf)
-esym(534, fprintf)
-esym(534, vfprintf)
-esym(534, sprintf)
-esym(534, memset)
......@@ -151,6 +152,10 @@
-esym(759, vsm_diag)
///////////////////////////////////////////////////////////////////////
// "miniobj.h"
-emacro(774, REPLACE)
// It is ok to default after handling a few select SLT_* tags
-esym(788, VSL_tag_e::SLT_*) // enum constant '...' not used within defaulted switch
......
......@@ -5,3 +5,5 @@
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-dVARNISH_STATE_DIR="foo"
--emacro((835),BINHEAP_NOIDX)
+fan
-esym(788, vex_rhs_e::*)
-esym(788, VSL_transaction_e::*)
-esym(769, vex_rhs_e::VEX__UNSET)
-esym(749, chunk_t::chunk_t__unassigned)
......@@ -61,19 +61,21 @@ struct vslq_query {
struct vex *vex;
};
#define VSLQ_TEST_NUMOP(TYPE, PRE_LHS, OP, PRE_RHS) \
switch (TYPE) { \
case VEX_INT: \
if (PRE_LHS##_int OP PRE_RHS##_int) \
return (1); \
return (0); \
case VEX_FLOAT: \
if (PRE_LHS##_float OP PRE_RHS##_float) \
return (1); \
return (0); \
default: \
WRONG("Wrong RHS type"); \
}
#define VSLQ_TEST_NUMOP(TYPE, PRE_LHS, OP, PRE_RHS) \
do { \
switch (TYPE) { \
case VEX_INT: \
if (PRE_LHS##_int OP PRE_RHS##_int) \
return (1); \
return (0); \
case VEX_FLOAT: \
if (PRE_LHS##_float OP PRE_RHS##_float) \
return (1); \
return (0); \
default: \
WRONG("Wrong RHS type"); \
} \
} while(0) \
static int
vslq_test_vxid(const struct vex *vex, const struct VSL_transaction *trans)
......@@ -103,7 +105,7 @@ vslq_test_vxid(const struct vex *vex, const struct VSL_transaction *trans)
/* Compare */
switch (vex->tok) {
#define VXID_TEST_NUMOP(OP) return (trans->vxid OP rhs->val_int);
#define VXID_TEST_NUMOP(OP) return (trans->vxid OP rhs->val_int)
case T_EQ: VXID_TEST_NUMOP(==);
case T_NEQ: VXID_TEST_NUMOP(!=);
case '<': VXID_TEST_NUMOP(<);
......@@ -185,10 +187,9 @@ vslq_test_rec(const struct vex *vex, const struct VSLC_ptr *rec)
switch (rhs->type) {
case VEX_INT:
lhs_int = strtoll(b, &p, 0);
if (*p == '\0' || isspace(*p))
break;
/* Can't parse - no match */
return (0);
if (*p != '\0' && !isspace(*p))
return (0); /* Can't parse - no match */
break;
case VEX_FLOAT:
lhs_float = VNUMpfx(b, &q);
if (isnan(lhs_float))
......@@ -257,8 +258,7 @@ vslq_test_rec(const struct vex *vex, const struct VSLC_ptr *rec)
default:
WRONG("Bad expression token");
}
return (0);
NEEDLESS(return (0));
}
static int
......
......@@ -373,7 +373,7 @@ VUT_Main(void)
if (VUT.sigusr1) {
/* Flush and report any incomplete records */
VUT.sigusr1 = 0;
VSLQ_Flush(VUT.vslq, vut_dispatch, NULL);
(void)VSLQ_Flush(VUT.vslq, vut_dispatch, NULL);
}
if (VUT.vsm != NULL && !VSM_IsOpen(VUT.vsm)) {
......@@ -420,7 +420,7 @@ VUT_Main(void)
/* XXX: Make continuation optional */
VSLQ_Flush(VUT.vslq, vut_dispatch, NULL);
(void)VSLQ_Flush(VUT.vslq, vut_dispatch, NULL);
if (i == -2)
/* Abandoned */
......
......@@ -70,8 +70,6 @@ struct vxp {
int err;
};
struct vex;
struct vex_lhs {
/* Left-hand-side of a vex expression. Stores the information
about which records and what parts of those records the
......
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