Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/libhack Warning fixes from kurt.schreiner



details:   https://anonhg.NetBSD.org/src/rev/b441e03cda96
branches:  trunk
changeset: 473258:b441e03cda96
user:      gwr <gwr%NetBSD.org@localhost>
date:      Thu May 27 05:41:15 1999 +0000

description:
Warning fixes from kurt.schreiner

diffstat:

 distrib/utils/libhack/perror.c    |  3 ++-
 distrib/utils/libhack/strerror.c  |  4 ++--
 distrib/utils/libhack/strsignal.c |  6 +++---
 distrib/utils/libhack/utmp.c      |  4 +++-
 4 files changed, 10 insertions(+), 7 deletions(-)

diffs (87 lines):

diff -r 24504c0fe6c4 -r b441e03cda96 distrib/utils/libhack/perror.c
--- a/distrib/utils/libhack/perror.c    Thu May 27 03:45:21 1999 +0000
+++ b/distrib/utils/libhack/perror.c    Thu May 27 05:41:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perror.c,v 1.1 1999/05/19 03:55:33 gwr Exp $   */
+/*     $NetBSD: perror.c,v 1.2 1999/05/27 05:41:15 gwr Exp $   */
 
 /*
  * Copyright (c) 1988, 1993
@@ -36,6 +36,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
+#include <string.h>
 
 /*
  * Simplified from the libc version.
diff -r 24504c0fe6c4 -r b441e03cda96 distrib/utils/libhack/strerror.c
--- a/distrib/utils/libhack/strerror.c  Thu May 27 03:45:21 1999 +0000
+++ b/distrib/utils/libhack/strerror.c  Thu May 27 05:41:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strerror.c,v 1.1 1999/05/19 03:55:33 gwr Exp $ */
+/*     $NetBSD: strerror.c,v 1.2 1999/05/27 05:41:15 gwr Exp $ */
 
 /*
  * Copyright (c) 1988 Regents of the University of California.
@@ -49,7 +49,7 @@
 
        errnum = num;                           /* convert to unsigned */
        if (errnum < sys_nerr)
-               return(sys_errlist[errnum]);
+               return((__aconst char *)sys_errlist[errnum]);
 
        return("Unknown error number");
 }
diff -r 24504c0fe6c4 -r b441e03cda96 distrib/utils/libhack/strsignal.c
--- a/distrib/utils/libhack/strsignal.c Thu May 27 03:45:21 1999 +0000
+++ b/distrib/utils/libhack/strsignal.c Thu May 27 05:41:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strsignal.c,v 1.1 1999/05/19 03:55:33 gwr Exp $        */
+/*     $NetBSD: strsignal.c,v 1.2 1999/05/27 05:41:15 gwr Exp $        */
 
 /*
  * Copyright (c) 1988 Regents of the University of California.
@@ -35,7 +35,7 @@
 
 #include <stdio.h>
 #include <signal.h>
-#include <string.h>
+#include <unistd.h>
 
 /*
  * Simplified from the libc version.
@@ -49,7 +49,7 @@
 
        signum = num;                           /* convert to unsigned */
        if (signum < sys_nsig)
-               return((char *)sys_siglist[signum]);
+               return((__aconst char *)sys_siglist[signum]);
 
        return("Unknown signal number");
 }
diff -r 24504c0fe6c4 -r b441e03cda96 distrib/utils/libhack/utmp.c
--- a/distrib/utils/libhack/utmp.c      Thu May 27 03:45:21 1999 +0000
+++ b/distrib/utils/libhack/utmp.c      Thu May 27 05:41:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utmp.c,v 1.1 1999/05/19 03:54:40 gwr Exp $     */
+/*     $NetBSD: utmp.c,v 1.2 1999/05/27 05:41:15 gwr Exp $     */
 
 /*
  * Written by Gordon W. Ross <gwr%netbsd.org@localhost>
@@ -8,6 +8,7 @@
 /* Simplified (do nothing:) */
 #include <sys/types.h>
 #include <utmp.h>
+#include <util.h>
 
 void
 login(ut)
@@ -19,6 +20,7 @@
 logout(line)
        const char *line;
 {
+       return(0);
 }
 
 



Home | Main Index | Thread Index | Old Index