mirror of
https://gitlab.com/procps-ng/procps.git
synced 2024-11-24 10:35:17 +08:00
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:
parent
afa45f0da0
commit
2f6b9bbfb8
7
pgrep.c
7
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user