From cdcabcc0585317472ce26df2c92d9cc9ec497e72 Mon Sep 17 00:00:00 2001 From: gad Date: Fri, 26 Mar 2004 00:36:27 +0000 Subject: Add a cast to get this to compile with WARNS=5 on sparc64. This is needed because off_t == __int64_t, while size_t == __uint64_t. This also compiles with WARNS=5 on amd64, but I haven't tested the other platforms yet. --- usr.bin/pkill/Makefile | 2 +- usr.bin/pkill/pkill.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/pkill') diff --git a/usr.bin/pkill/Makefile b/usr.bin/pkill/Makefile index 3f93572..698cfe7 100644 --- a/usr.bin/pkill/Makefile +++ b/usr.bin/pkill/Makefile @@ -4,7 +4,7 @@ PROG= pkill SRCS= pkill.c MAN= pkill.1 -WARNS?= 1 +WARNS?= 5 LDADD+= -lkvm DPADD+= ${LIBKVM} diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index 7922739..a9e2cb0 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -309,7 +309,8 @@ main(int argc, char **argv) if (rv == 0) { if (fullmatch) { if (regmatch.rm_so == 0 && - regmatch.rm_eo == strlen(mstr)) + regmatch.rm_eo == + (off_t)strlen(mstr)) selected[i] = 1; } else selected[i] = 1; -- cgit v1.1