From 9b09381db22a39ab2c6c7642d83485fb2cb411cc Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 24 Jul 2006 05:03:06 +0000 Subject: [PATCH] - (djm) [session.c] fix compile error with -Werror -Wall: 'path' is only used in do_setup_env() if HAVE_LOGIN_CAP is not defined --- ChangeLog | 5 ++++- session.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cad6d2f6..86e93b11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -119,7 +119,10 @@ - (djm) [uuencode.c] Add resolv.h, is it contains the prototypes for __b64_ntop/__b64_pton on some platforms - + - (djm) [session.c] + fix compile error with -Werror -Wall: 'path' is only used in + do_setup_env() if HAVE_LOGIN_CAP is not defined + 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h diff --git a/session.c b/session.c index c2730a42..0c20d9e8 100644 --- a/session.c +++ b/session.c @@ -995,8 +995,11 @@ do_setup_env(Session *s, const char *shell) { char buf[256]; u_int i, envsize; - char **env, *laddr, *path = NULL; + char **env, *laddr; struct passwd *pw = s->pw; +#ifndef HAVE_LOGIN_CAP + char *path = NULL; +#endif /* Initialize the environment. */ envsize = 100; -- 2.45.2