From 0b65b628894be7a05f91923855dde325f16a3e64 Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 29 Aug 2000 22:21:22 +0000 Subject: [PATCH] - (djm) Compile warning fixes from Mark Miller --- ChangeLog | 3 +++ bsd-daemon.c | 9 +-------- bsd-mktemp.c | 14 +------------- bsd-snprintf.c | 4 +++- session.c | 2 ++ 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06f412a6..1fe68ed6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +20000830 + - (djm) Compile warning fixes from Mark Miller + 20000829 - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert Doering , John Horne and diff --git a/bsd-daemon.c b/bsd-daemon.c index fe92b76b..de829958 100644 --- a/bsd-daemon.c +++ b/bsd-daemon.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -#include "config.h" +#include "includes.h" #ifndef HAVE_DAEMON @@ -39,13 +39,6 @@ static char rcsid[] = "$OpenBSD: daemon.c,v 1.2 1996/08/19 08:22:13 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ -#include -#include - -#ifdef HAVE_PATHS_H -# include -#endif - int daemon(nochdir, noclose) int nochdir, noclose; diff --git a/bsd-mktemp.c b/bsd-mktemp.c index 23831fa9..e8ffd021 100644 --- a/bsd-mktemp.c +++ b/bsd-mktemp.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. */ -#include "config.h" +#include "includes.h" #ifndef HAVE_MKDTEMP @@ -42,18 +42,6 @@ static char rcsid[] = "$OpenBSD: mktemp.c,v 1.13 1998/06/30 23:03:13 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "bsd-misc.h" -#include "bsd-arc4random.h" - static int _gettemp(char *, int *, int, int); int diff --git a/bsd-snprintf.c b/bsd-snprintf.c index 4716ee29..5b674c56 100644 --- a/bsd-snprintf.c +++ b/bsd-snprintf.c @@ -116,7 +116,9 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); #define DP_C_LDOUBLE 3 #define char_to_int(p) (p - '0') -#define MAX(p,q) ((p >= q) ? p : q) +#ifndef MAX +# define MAX(p,q) ((p >= q) ? p : q) +#endif static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) { diff --git a/session.c b/session.c index 4a77eef6..3678b8f0 100644 --- a/session.c +++ b/session.c @@ -1837,7 +1837,9 @@ session_proctitle(Session *s) void do_authenticated2(void) { +#ifdef HAVE_LOGIN_CAP struct passwd *pw; +#endif /* * Cancel the alarm we set to limit the time taken for -- 2.45.2