diff options
author | Jaromir Capik <jcapik@redhat.com> | 2013-11-04 16:26:19 +0100 |
---|---|---|
committer | Jaromir Capik <jcapik@redhat.com> | 2013-11-04 16:26:19 +0100 |
commit | f76e1676b56992716637aad2c9842a539eee85fe (patch) | |
tree | b4e49418a6479f68cfd39e1621b8ccb484e630f0 /pidof.c | |
parent | 35dc6dcc49cc9cf8cff4300cb03a38dbe44c05db (diff) | |
download | procps-ng-f76e1676b56992716637aad2c9842a539eee85fe.tar.gz |
pidof: fixing compiller warnings
Removing unused variable and adding explicit pid_t retype in printf.
Diffstat (limited to 'pidof.c')
-rw-r--r-- | pidof.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -133,7 +133,7 @@ static void select_procs (void) { PROCTAB *ptp; proc_t task; - int match, root_check_ok; + int match; static int size = 0; char *cmd_arg0, *cmd_arg0base; char *cmd_arg1, *cmd_arg1base; @@ -351,9 +351,9 @@ int main (int argc, char **argv) for (i = proc_count - 1; i >= 0; i--) { /* and display their PIDs */ if (first_pid) { first_pid = 0; - printf ("%ld", procs[i].pid); + printf ("%ld", (long) procs[i].pid); } else { - printf (" %ld", procs[i].pid); + printf (" %ld", (long) procs[i].pid); } if (opt_single_shot) break; } |