summaryrefslogtreecommitdiff
path: root/pidof.c
diff options
context:
space:
mode:
authorJaromir Capik <jcapik@redhat.com>2013-11-04 16:26:19 +0100
committerJaromir Capik <jcapik@redhat.com>2013-11-04 16:26:19 +0100
commitf76e1676b56992716637aad2c9842a539eee85fe (patch)
treeb4e49418a6479f68cfd39e1621b8ccb484e630f0 /pidof.c
parent35dc6dcc49cc9cf8cff4300cb03a38dbe44c05db (diff)
downloadprocps-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pidof.c b/pidof.c
index 72344e7..2e0911d 100644
--- a/pidof.c
+++ b/pidof.c
@@ -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;
}