From 0d3ed1b0bc152f3dc49045ae4cab526bbc2336ea Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 8 May 2009 17:43:54 +0000 Subject: [PATCH] WARNS=4 --- external/bsd/file/Makefile | 5 +++++ external/bsd/file/Makefile.inc | 3 ++- external/bsd/file/dist/src/cdf.c | 10 +++++----- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 external/bsd/file/Makefile diff --git a/external/bsd/file/Makefile b/external/bsd/file/Makefile new file mode 100644 index 000000000000..95cbb2f7542d --- /dev/null +++ b/external/bsd/file/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2009/05/08 17:43:54 christos Exp $ + +SUBDIR= lib .WAIT bin + +.include diff --git a/external/bsd/file/Makefile.inc b/external/bsd/file/Makefile.inc index 22a3e33938d9..bd292a0d2dfb 100644 --- a/external/bsd/file/Makefile.inc +++ b/external/bsd/file/Makefile.inc @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.1 2009/05/08 17:28:01 christos Exp $ +# $NetBSD: Makefile.inc,v 1.2 2009/05/08 17:43:54 christos Exp $ DIST=${.CURDIR}/../dist +WARNS=4 USE_FORT?= yes # data-driven bugs? diff --git a/external/bsd/file/dist/src/cdf.c b/external/bsd/file/dist/src/cdf.c index f06d265d2dfc..755cda9c5e77 100644 --- a/external/bsd/file/dist/src/cdf.c +++ b/external/bsd/file/dist/src/cdf.c @@ -1,4 +1,4 @@ -/* $NetBSD: cdf.c,v 1.2 2009/05/08 17:28:01 christos Exp $ */ +/* $NetBSD: cdf.c,v 1.3 2009/05/08 17:43:54 christos Exp $ */ /*- * Copyright (c) 2008 Christos Zoulas @@ -37,7 +37,7 @@ #if 0 FILE_RCSID("@(#)$File: cdf.c,v 1.30 2009/05/06 14:29:47 christos Exp $") #else -__RCSID("$NetBSD: cdf.c,v 1.2 2009/05/08 17:28:01 christos Exp $"); +__RCSID("$NetBSD: cdf.c,v 1.3 2009/05/08 17:43:54 christos Exp $"); #endif #endif @@ -949,18 +949,18 @@ cdf_print_elapsed_time(char *buf, size_t bufsiz, cdf_timestamp_t ts) if (days) { len += snprintf(buf + len, bufsiz - len, "%dd+", days); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; } if (days || hours) { len += snprintf(buf + len, bufsiz - len, "%.2d:", hours); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; } len += snprintf(buf + len, bufsiz - len, "%.2d:", mins); - if (len >= bufsiz) + if ((size_t)len >= bufsiz) return len; len += snprintf(buf + len, bufsiz - len, "%.2d", secs);