Commit bc609650 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Flexelinting. VUT_Error never returns.

parent f98d28c5
-efile(451, "varnishhist_profiles.h")
-efile(451, "varnishhist_options.h")
-sem(usage, r_no)
......@@ -10,3 +10,4 @@
-e788 // enum constant '___' not used within defaulted switch
-e641 // Converting enum '___' to '___'
-sem(usage,r_no)
-efile(451, "varnishncsa_options.h")
-sem(usage, r_no)
......@@ -1146,9 +1146,8 @@ read_format(const char *formatfile)
free(fmt);
if (feof(fmtfile))
VUT_Error(vut, 1, "Empty format file");
else
VUT_Error(vut, 1, "Can't read format from file (%s)",
strerror(errno));
VUT_Error(vut, 1, "Can't read format from file (%s)",
strerror(errno));
}
fclose(fmtfile);
if (fmt[fmtlen - 1] == '\n')
......
......@@ -3,22 +3,4 @@
-efile(451, varnishstat_options.h)
-esym(850, av)
-e712 // 14 Info 712 Loss of precision (___) (___ to ___)
-e747 // 16 Info 747 Significant prototype coercion (___) ___ to ___
-e763 // Redundant declaration for symbol '...' previously declared
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
-emacro(774, MAC_STAT)
-emacro(506, MAC_STAT)
-emacro(525, MAC_STAT)
-efile(451, "*/include/stat_field.h")
-e850 // for loop index variable '___' whose type category is '___' is modified in body of the for loop that began at '___'
-sem(usage, r_no)
......@@ -118,7 +118,7 @@ static int sample = 0;
static int scale = 1;
static double t_sample = 0.;
static double interval = 1.;
static int vsm_status = 0;
static unsigned vsm_status = 0;
static void
init_hitrate(void)
......@@ -395,16 +395,16 @@ make_windows(void)
}
static void
print_duration(WINDOW *w, time_t t)
print_duration(WINDOW *w, uint64_t t)
{
wprintw(w, "%4jd+%02jd:%02jd:%02jd",
(intmax_t)t / 86400, (intmax_t)(t % 86400) / 3600,
(intmax_t)(t % 3600) / 60, (intmax_t)t % 60);
wprintw(w, "%4ju+%02ju:%02ju:%02ju",
(uintmax_t)t / 86400, (uintmax_t)(t % 86400) / 3600,
(uintmax_t)(t % 3600) / 60, (uintmax_t)t % 60);
}
static void
running(WINDOW *w, time_t up, int flg)
running(WINDOW *w, uint64_t up, int flg)
{
if (vsm_status & flg) {
print_duration(w_status, up);
......@@ -418,8 +418,8 @@ running(WINDOW *w, time_t up, int flg)
static void
draw_status(void)
{
time_t up_mgt = 0;
time_t up_chld = 0;
uint64_t up_mgt = 0;
uint64_t up_chld = 0;
AN(w_status);
......
......@@ -8,6 +8,9 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-sem(t_order_VRB_INSERT, custodial(2))
-sem(t_key_VRB_INSERT, custodial(2))
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
......
......@@ -91,6 +91,11 @@
-esym(759, vmod_enum_*) // header declaration for symbol '___' defined at (___)
-esym(765, vmod_enum_*) // external '___' (___) could be made static
///////////////////////////////////////////////////////////////////////
// <vut.h>
-sem(VUT_Error, r_no)
///////////////////////////////////////////////////////////////////////
// <vas.h>
......@@ -130,8 +135,6 @@
-esym(534, VSB_vprintf)
-esym(534, VSB_putc)
///////////////////////////////////////////////////////////////////////
// <vqueue.h>
......
......@@ -69,7 +69,7 @@ struct VUT {
};
void VUT_Error(struct VUT *, int status, const char *fmt, ...)
v_printflike_(3, 4);
v_noreturn_ v_printflike_(3, 4);
int VUT_Arg(struct VUT *, int opt, const char *arg);
......
......@@ -124,6 +124,7 @@ VUT_Error(struct VUT *vut, int status, const char *fmt, ...)
va_start(ap, fmt);
vut->error_f(vut, status, fmt, ap);
va_end(ap);
exit(2);
}
int
......
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