diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-07-29 11:48:41 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-07-29 11:48:41 +0200 |
commit | 7834874237b791abe04a1b22aff207cfa5293e34 (patch) | |
tree | 78ef1232fa5ee017220c3c1bb94954448a5ccf24 /flowtop.c | |
parent | e18e050dfb9a79241bc5169569ce28071353a8c1 (diff) |
flowtop: Fix compiler warnings
Fix the following compiler warnings that occur when building with "-W
-Wall -Wextra":
flowtop.c: In function ‘walk_process’:
flowtop.c:417:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
flowtop.c: In function ‘presenter_screen_update’:
flowtop.c:937:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
flowtop.c:938:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'flowtop.c')
-rw-r--r-- | flowtop.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -414,7 +414,7 @@ static int walk_process(char *process, struct flow_entry *n) if (stat(path, &statbuf) < 0) continue; - if (S_ISSOCK(statbuf.st_mode) && n->inode == statbuf.st_ino) { + if (S_ISSOCK(statbuf.st_mode) && (ino_t) n->inode == statbuf.st_ino) { memset(n->cmdline, 0, sizeof(n->cmdline)); snprintf(path, sizeof(path), "/proc/%s/exe", process); @@ -883,7 +883,8 @@ static inline int presenter_flow_wrong_state(struct flow_entry *n, int state) static void presenter_screen_update(WINDOW *screen, struct flow_list *fl, int skip_lines) { - int i, j, maxy; + int maxy; + size_t i, j; unsigned int line = 3; struct flow_entry *n; uint8_t protocols[] = { |