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

Flexelinting

parent 1c05470d
...@@ -276,6 +276,7 @@ main(int argc, char * const *argv) ...@@ -276,6 +276,7 @@ main(int argc, char * const *argv)
case 'h': case 'h':
/* Usage help */ /* Usage help */
usage(0); usage(0);
break;
case 'l': case 'l':
f_list = 1; f_list = 1;
break; break;
......
...@@ -257,7 +257,7 @@ sample_points(void) ...@@ -257,7 +257,7 @@ sample_points(void)
update_ma(&pt->ma_1000, (int64_t)pt->cur); update_ma(&pt->ma_1000, (int64_t)pt->cur);
} else if (pt->vpt->semantics == 'c') { } else if (pt->vpt->semantics == 'c') {
if (main_uptime != NULL && *main_uptime) if (main_uptime != NULL && *main_uptime)
pt->avg = pt->cur / *main_uptime; pt->avg = pt->cur / (double)*main_uptime;
else else
pt->avg = 0.; pt->avg = 0.;
if (pt->t_last) { if (pt->t_last) {
...@@ -471,7 +471,7 @@ draw_bar_t(void) ...@@ -471,7 +471,7 @@ draw_bar_t(void)
x += 4; x += 4;
mvwprintw(w_bar_t, 0, x, "%.*s", colw_name - 4, "NAME"); mvwprintw(w_bar_t, 0, x, "%.*s", colw_name - 4, "NAME");
x += colw_name - 4; x += colw_name - 4;
col = 0; col = COL_CUR;
while (col < COL_LAST) { while (col < COL_LAST) {
if (X - x < COLW) if (X - x < COLW)
break; break;
...@@ -520,7 +520,7 @@ draw_line_default(WINDOW *w, int y, int x, int X, const struct pt *pt) ...@@ -520,7 +520,7 @@ draw_line_default(WINDOW *w, int y, int x, int X, const struct pt *pt)
AN(w); AN(w);
AN(pt); AN(pt);
col = 0; col = COL_CUR;
while (col < COL_LAST) { while (col < COL_LAST) {
if (X - x < COLW) if (X - x < COLW)
break; break;
...@@ -608,7 +608,7 @@ draw_line_bytes(WINDOW *w, int y, int x, int X, const struct pt *pt) ...@@ -608,7 +608,7 @@ draw_line_bytes(WINDOW *w, int y, int x, int X, const struct pt *pt)
AN(w); AN(w);
AN(pt); AN(pt);
col = 0; col = COL_CUR;
while (col < COL_LAST) { while (col < COL_LAST) {
if (X - x < COLW) if (X - x < COLW)
break; break;
...@@ -652,7 +652,7 @@ draw_line_bytes(WINDOW *w, int y, int x, int X, const struct pt *pt) ...@@ -652,7 +652,7 @@ draw_line_bytes(WINDOW *w, int y, int x, int X, const struct pt *pt)
static void static void
draw_line_bitmap(WINDOW *w, int y, int x, int X, const struct pt *pt) draw_line_bitmap(WINDOW *w, int y, int x, int X, const struct pt *pt)
{ {
int ch; unsigned ch;
enum { enum {
COL_VAL, COL_VAL,
COL_MAP, COL_MAP,
...@@ -663,7 +663,7 @@ draw_line_bitmap(WINDOW *w, int y, int x, int X, const struct pt *pt) ...@@ -663,7 +663,7 @@ draw_line_bitmap(WINDOW *w, int y, int x, int X, const struct pt *pt)
AN(pt); AN(pt);
assert(pt->vpt->format == 'b'); assert(pt->vpt->format == 'b');
col = 0; col = COL_VAL;
while (col < COL_LAST) { while (col < COL_LAST) {
switch (col) { switch (col) {
case COL_VAL: case COL_VAL:
...@@ -703,7 +703,7 @@ draw_line_duration(WINDOW *w, int y, int x, int X, const struct pt *pt) ...@@ -703,7 +703,7 @@ draw_line_duration(WINDOW *w, int y, int x, int X, const struct pt *pt)
AN(w); AN(w);
AN(pt); AN(pt);
col = 0; col = COL_DUR;
while (col < COL_LAST) { while (col < COL_LAST) {
if (X - x < COLW) if (X - x < COLW)
break; break;
...@@ -1021,7 +1021,7 @@ do_curses(struct vsm *vsm, struct vsc *vsc, double delay) ...@@ -1021,7 +1021,7 @@ do_curses(struct vsm *vsm, struct vsc *vsc, double delay)
if (redraw) if (redraw)
draw_screen(); draw_screen();
t = (t_sample + interval - now) * 1000; t = (long)((t_sample + interval - now) * 1000);
wtimeout(w_status, t); wtimeout(w_status, t);
ch = wgetch(w_status); ch = wgetch(w_status);
......
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