diff options
Diffstat (limited to 'procps/top.c')
-rw-r--r-- | procps/top.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/procps/top.c b/procps/top.c index 206f9e8be..ca43376ac 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -53,7 +53,7 @@ typedef struct jiffy_counts_t { | |||
53 | the next. Used for finding deltas. */ | 53 | the next. Used for finding deltas. */ |
54 | typedef struct save_hist { | 54 | typedef struct save_hist { |
55 | unsigned long ticks; | 55 | unsigned long ticks; |
56 | unsigned pid; | 56 | pid_t pid; |
57 | } save_hist; | 57 | } save_hist; |
58 | 58 | ||
59 | typedef int (*cmp_funcp)(top_status_t *P, top_status_t *Q); | 59 | typedef int (*cmp_funcp)(top_status_t *P, top_status_t *Q); |
@@ -317,7 +317,7 @@ static unsigned long display_header(int scr_width) | |||
317 | fclose(fp); | 317 | fclose(fp); |
318 | 318 | ||
319 | /* output memory info */ | 319 | /* output memory info */ |
320 | if (scr_width > sizeof(scrbuf)) | 320 | if (scr_width > (int)sizeof(scrbuf)) |
321 | scr_width = sizeof(scrbuf); | 321 | scr_width = sizeof(scrbuf); |
322 | snprintf(scrbuf, scr_width, | 322 | snprintf(scrbuf, scr_width, |
323 | "Mem: %luK used, %luK free, %luK shrd, %luK buff, %luK cached", | 323 | "Mem: %luK used, %luK free, %luK shrd, %luK buff, %luK cached", |
@@ -481,7 +481,7 @@ static NOINLINE void display_process_list(int count, int scr_width) | |||
481 | , SHOW_STAT(pcpu) | 481 | , SHOW_STAT(pcpu) |
482 | #endif | 482 | #endif |
483 | ); | 483 | ); |
484 | if (col + 1 < scr_width) | 484 | if ((int)(col + 1) < scr_width) |
485 | read_cmdline(line_buf + col, scr_width - col - 1, s->pid, s->comm); | 485 | read_cmdline(line_buf + col, scr_width - col - 1, s->pid, s->comm); |
486 | fputs(line_buf, stdout); | 486 | fputs(line_buf, stdout); |
487 | /* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu, | 487 | /* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu, |
@@ -584,7 +584,7 @@ static char *grab_number(char *str, const char *match, unsigned sz) | |||
584 | static void display_topmem_header(int scr_width) | 584 | static void display_topmem_header(int scr_width) |
585 | { | 585 | { |
586 | char linebuf[128]; | 586 | char linebuf[128]; |
587 | int i; | 587 | unsigned i; |
588 | FILE *fp; | 588 | FILE *fp; |
589 | union { | 589 | union { |
590 | struct { | 590 | struct { |
@@ -703,7 +703,7 @@ static NOINLINE void display_topmem_process_list(int count, int scr_width) | |||
703 | ulltoa6_and_space(s->dirty_sh, &line_buf[6*6]); | 703 | ulltoa6_and_space(s->dirty_sh, &line_buf[6*6]); |
704 | ulltoa6_and_space(s->stack , &line_buf[7*6]); | 704 | ulltoa6_and_space(s->stack , &line_buf[7*6]); |
705 | line_buf[8*6] = '\0'; | 705 | line_buf[8*6] = '\0'; |
706 | if (scr_width > MIN_WIDTH) { | 706 | if (scr_width > (int)MIN_WIDTH) { |
707 | read_cmdline(&line_buf[8*6], scr_width - MIN_WIDTH, s->pid, s->comm); | 707 | read_cmdline(&line_buf[8*6], scr_width - MIN_WIDTH, s->pid, s->comm); |
708 | } | 708 | } |
709 | printf("\n""%.*s", scr_width, line_buf); | 709 | printf("\n""%.*s", scr_width, line_buf); |