summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2012-11-02 17:50:52 +0000
committerCraig Small <csmall@enc.com.au>2012-11-06 22:27:48 +1100
commit9ba7f3abdb4edea1f3d0bb9d3d3944344ffadc33 (patch)
tree15a5243735b5ed66160b1c7d5827724198f8aa38
parente677476aea95a0f1f50097b02c75510354c23296 (diff)
downloadprocps-ng-9ba7f3abdb4edea1f3d0bb9d3d3944344ffadc33.tar.gz
pgrep: fix compiler warnings
pgrep.c:195:12: warning: 'fcntl_lock' defined but not used [-Wunused-function] pgrep.c:575:5: warning: no previous declaration for 'signal_option' [-Wmissing-declarations] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--pgrep.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/pgrep.c b/pgrep.c
index 6cba9aa..4938bc9 100644
--- a/pgrep.c
+++ b/pgrep.c
@@ -187,23 +187,6 @@ static int strict_atol (const char *restrict str, long *restrict value)
#include <sys/file.h>
-/* Seen non-BSD code do this:
- *
- *if (fcntl_lock(pid_fd, F_SETLK, F_WRLCK, SEEK_SET, 0, 0) == -1)
- * return -1;
- */
-int fcntl_lock(int fd, int cmd, int type, int whence, int start, int len)
-{
- struct flock lock[1];
-
- lock->l_type = type;
- lock->l_whence = whence;
- lock->l_start = start;
- lock->l_len = len;
-
- return fcntl(fd, cmd, lock);
-}
-
/* We try a read lock. The daemon should have a write lock.
* Seen using flock: FreeBSD code */
static int has_flock(int fd)
@@ -572,7 +555,7 @@ static struct el * select_procs (int *num)
return list;
}
-int signal_option(int *argc, char **argv)
+static int signal_option(int *argc, char **argv)
{
int sig;
int i;