Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tsort WARNS=3
details: https://anonhg.NetBSD.org/src/rev/33953dfaf9dc
branches: trunk
changeset: 583137:33953dfaf9dc
user: christos <christos%NetBSD.org@localhost>
date: Tue Jul 19 23:18:31 2005 +0000
description:
WARNS=3
diffstat:
usr.bin/tsort/Makefile | 3 ++-
usr.bin/tsort/tsort.c | 13 ++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r 795d4d2e0267 -r 33953dfaf9dc usr.bin/tsort/Makefile
--- a/usr.bin/tsort/Makefile Tue Jul 19 23:07:10 2005 +0000
+++ b/usr.bin/tsort/Makefile Tue Jul 19 23:18:31 2005 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2003/05/18 07:57:37 lukem Exp $
+# $NetBSD: Makefile,v 1.6 2005/07/19 23:18:31 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/9/93
PROG= tsort
+WARNS=3
.include <bsd.prog.mk>
diff -r 795d4d2e0267 -r 33953dfaf9dc usr.bin/tsort/tsort.c
--- a/usr.bin/tsort/tsort.c Tue Jul 19 23:07:10 2005 +0000
+++ b/usr.bin/tsort/tsort.c Tue Jul 19 23:18:31 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsort.c,v 1.20 2003/10/27 00:12:43 lukem Exp $ */
+/* $NetBSD: tsort.c,v 1.21 2005/07/19 23:18:31 christos Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)tsort.c 8.3 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: tsort.c,v 1.20 2003/10/27 00:12:43 lukem Exp $");
+__RCSID("$NetBSD: tsort.c,v 1.21 2005/07/19 23:18:31 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -187,7 +187,7 @@
/* do the sort */
tsort();
- exit(0);
+ return(0);
}
/* double the size of oldbuf and return a pointer to the new buffer. */
@@ -260,7 +260,7 @@
switch ((*db->get)(db, &key, &data, 0)) {
case 0:
- memmove(&n, data.data, sizeof(n));
+ (void)memmove(&n, data.data, sizeof(n));
return (n);
case 1:
break;
@@ -277,7 +277,7 @@
n->n_arcs = NULL;
n->n_refcnt = 0;
n->n_flags = 0;
- memmove(n->n_name, name, key.size);
+ (void)memmove(n->n_name, name, key.size);
/* Add to linked list. */
if ((n->n_next = graph) != NULL)
@@ -409,8 +409,7 @@
if (*np == to) {
if (depth + 1 > longest_len) {
longest_len = depth + 1;
- (void)memcpy((char *)longest_cycle,
- (char *)cycle_buf,
+ (void)memcpy(longest_cycle, cycle_buf,
longest_len * sizeof(NODE *));
}
} else {
Home |
Main Index |
Thread Index |
Old Index