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 <kerolasa@iki.fi>

Conflicts:

	pgrep.c
This commit is contained in:
Sami Kerola 2012-02-25 22:09:50 +01:00 committed by Craig Small
parent afa45f0da0
commit 2f6b9bbfb8

View File

@ -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 {