summaryrefslogtreecommitdiffstats
path: root/usr.bin/lock
diff options
context:
space:
mode:
authorgavin <gavin@FreeBSD.org>2010-06-28 08:30:10 +0000
committergavin <gavin@FreeBSD.org>2010-06-28 08:30:10 +0000
commit491aa14591485204fb4088c282f024c97d2c56cd (patch)
treea3806b4dea66601324f8c1e8d0ac023710317673 /usr.bin/lock
parent670ade5766fa8021d682a1f86e81ae8fa6b31f07 (diff)
downloadFreeBSD-src-491aa14591485204fb4088c282f024c97d2c56cd.zip
FreeBSD-src-491aa14591485204fb4088c282f024c97d2c56cd.tar.gz
Make WARNS=6 safe.
Tested by: make universe
Diffstat (limited to 'usr.bin/lock')
-rw-r--r--usr.bin/lock/Makefile2
-rw-r--r--usr.bin/lock/lock.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile
index 8093ca5..dc09a87 100644
--- a/usr.bin/lock/Makefile
+++ b/usr.bin/lock/Makefile
@@ -7,6 +7,4 @@ BINMODE=4555
DPADD= ${LIBCRYPT}
LDADD= -lcrypt
-WARNS?= 1
-
.include <bsd.prog.mk>
diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c
index 3b19e35..eef4caa 100644
--- a/usr.bin/lock/lock.c
+++ b/usr.bin/lock/lock.c
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
#include <ctype.h>
#include <errno.h>
#include <pwd.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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);
}
}
}
OpenPOWER on IntegriCloud