Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Fix all the issues lint is too dumb to warn about a...
details: https://anonhg.NetBSD.org/src/rev/ba2129bcbb73
branches: trunk
changeset: 778043:ba2129bcbb73
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Mar 13 22:37:51 2012 +0000
description:
Fix all the issues lint is too dumb to warn about and re-enable
-Wconstant-conversion.
diffstat:
lib/libc/Makefile.inc | 3 +--
lib/libc/compat/gen/compat___fts13.c | 8 +++++---
lib/libc/compat/gen/compat___fts30.c | 5 ++++-
lib/libc/compat/gen/compat_fts.c | 9 ++++++++-
4 files changed, 18 insertions(+), 7 deletions(-)
diffs (83 lines):
diff -r fbc09171c982 -r ba2129bcbb73 lib/libc/Makefile.inc
--- a/lib/libc/Makefile.inc Tue Mar 13 22:24:48 2012 +0000
+++ b/lib/libc/Makefile.inc Tue Mar 13 22:37:51 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2012/03/13 22:12:40 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.11 2012/03/13 22:37:51 joerg Exp $
# @(#)Makefile 8.2 (Berkeley) 2/3/94
#
# All library objects contain sccsid strings by default; they may be
@@ -25,7 +25,6 @@
WARNS=4
CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC
-CWARNFLAGS+= -Wno-constant-conversion
.if (${USE_HESIOD} != "no")
CPPFLAGS+= -DHESIOD
diff -r fbc09171c982 -r ba2129bcbb73 lib/libc/compat/gen/compat___fts13.c
--- a/lib/libc/compat/gen/compat___fts13.c Tue Mar 13 22:24:48 2012 +0000
+++ b/lib/libc/compat/gen/compat___fts13.c Tue Mar 13 22:37:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat___fts13.c,v 1.7 2012/03/13 21:13:31 christos Exp $ */
+/* $NetBSD: compat___fts13.c,v 1.8 2012/03/13 22:37:51 joerg Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
@@ -33,10 +33,12 @@
#define __fts_dev_t uint32_t
#define __fts_level_t short
-#ifndef fts_namelen_truncate
+#undef fts_namelen_truncate
#define fts_namelen_truncate(a) \
((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
-#endif
+#undef fts_pathlen_truncate
+#define ftsent_pathlen_truncate(a) \
+ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
#define stat __stat13
#define lstat __lstat13
diff -r fbc09171c982 -r ba2129bcbb73 lib/libc/compat/gen/compat___fts30.c
--- a/lib/libc/compat/gen/compat___fts30.c Tue Mar 13 22:24:48 2012 +0000
+++ b/lib/libc/compat/gen/compat___fts30.c Tue Mar 13 22:37:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat___fts30.c,v 1.4 2012/03/13 21:13:31 christos Exp $ */
+/* $NetBSD: compat___fts30.c,v 1.5 2012/03/13 22:37:51 joerg Exp $ */
#include "namespace.h"
#include <sys/cdefs.h>
@@ -40,6 +40,9 @@
#define fts_namelen_truncate(a) \
((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
#endif
+#undef fts_pathlen_truncate
+#define ftsent_pathlen_truncate(a) \
+ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
#undef fts_children
#define fts_children __fts_children30
diff -r fbc09171c982 -r ba2129bcbb73 lib/libc/compat/gen/compat_fts.c
--- a/lib/libc/compat/gen/compat_fts.c Tue Mar 13 22:24:48 2012 +0000
+++ b/lib/libc/compat/gen/compat_fts.c Tue Mar 13 22:37:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_fts.c,v 1.4 2009/10/19 17:52:05 christos Exp $ */
+/* $NetBSD: compat_fts.c,v 1.5 2012/03/13 22:37:51 joerg Exp $ */
/*
* Written by Jason R. Thorpe <thorpej%NetBSD.org@localhost>, October 21, 1997.
@@ -22,6 +22,13 @@
#define __fts_dev_t uint32_t
#define __fts_level_t short
+#undef fts_namelen_truncate
+#define fts_namelen_truncate(a) \
+ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
+#undef fts_pathlen_truncate
+#define ftsent_pathlen_truncate(a) \
+ ((a) > USHRT_MAX ? USHRT_MAX : (unsigned short)(a))
+
#include <fts.h>
#include <compat/include/fts.h>
Home |
Main Index |
Thread Index |
Old Index