From 84f70ae3602ddc646bd0bef4f2f77b868499e3c4 Mon Sep 17 00:00:00 2001 From: Gavin Atkinson Date: Mon, 28 Jun 2010 08:30:10 +0000 Subject: [PATCH] Make WARNS=6 safe. Tested by: make universe --- usr.bin/lock/Makefile | 2 -- usr.bin/lock/lock.c | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile index 8093ca51ba1..dc09a87b1b9 100644 --- a/usr.bin/lock/Makefile +++ b/usr.bin/lock/Makefile @@ -7,6 +7,4 @@ BINMODE=4555 DPADD= ${LIBCRYPT} LDADD= -lcrypt -WARNS?= 1 - .include diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c index 3b19e35bbe1..eef4caabb32 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -257,9 +258,9 @@ hi(int signo __unused) if (no_timeout) { (void)putchar('\n'); } else { - (void)printf("timeout in %ld:%ld minutes\n", - (nexttime - timval.tv_sec) / 60, - (nexttime - timval.tv_sec) % 60); + (void)printf("timeout in %jd:%jd minutes\n", + (intmax_t)(nexttime - timval.tv_sec) / 60, + (intmax_t)(nexttime - timval.tv_sec) % 60); } } }