From 2f6b9bbfb8bb7fd5759ea449025a388682e88582 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 25 Feb 2012 22:09:50 +0100 Subject: [PATCH] pgrep: fix compiler warnings pgrep.c:539:10: warning: unused variable 'buff' [-Wunused-variable] pgrep.c:648:1: warning: "/*" within comment [-Wcomment] pgrep.c:803:4: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat] Signed-off-by: Sami Kerola Conflicts: pgrep.c --- pgrep.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pgrep.c b/pgrep.c index b1d4ace4..1618a685 100644 --- a/pgrep.c +++ b/pgrep.c @@ -536,7 +536,6 @@ static struct el * select_procs (int *num) list = xrealloc(list, size * sizeof *list); } if (list && (opt_long || opt_echo)) { - char buff[5096]; /* FIXME */ list[matches].num = task.XXXID; list[matches++].str = xstrdup (cmd); } else if (list) { @@ -644,7 +643,7 @@ static void parse_opts (int argc, char **argv) ++criteria_count; break; /* case 'I': / * FreeBSD: require confirmation before killing * / - * break; + * break; */ /* case 'J': / * Solaris: match by project ID (name or number) * / * break; */ case 'L': /* FreeBSD: fail if pidfile (see -F) not locked */ @@ -798,8 +797,8 @@ int main (int argc, char **argv) continue; } if (errno==ESRCH) - // gone now, which is OK - continue; + /* gone now, which is OK */ + continue; xwarn(_("killing pid %ld failed"), procs[i].num); } } else {