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

More Flexelintery

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