diff options
| author | christos <christos@NetBSD.org> | 2011-07-28 17:33:55 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2011-07-28 17:33:55 +0000 |
| commit | d46858ca2dde9ec8c4fefab6a4f200f495bf5552 (patch) | |
| tree | b095bc1c0063517292b51ba998d4ad90bc4ae4c3 /lib/libedit | |
| parent | cde2edd5a9283aaf7da57517d150ce38b343a466 (diff) | |
fix unused variable warnings on systems without _r functions
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/filecomplete.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libedit/filecomplete.c b/lib/libedit/filecomplete.c index 7f1c71091d1..cd9fa951f39 100644 --- a/lib/libedit/filecomplete.c +++ b/lib/libedit/filecomplete.c @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.24 2011/07/28 00:50:23 christos Exp $ */ +/* $NetBSD: filecomplete.c,v 1.25 2011/07/28 17:33:55 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.24 2011/07/28 00:50:23 christos Exp $"); +__RCSID("$NetBSD: filecomplete.c,v 1.25 2011/07/28 17:33:55 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/types.h> @@ -73,10 +73,13 @@ static const Char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', char * fn_tilde_expand(const char *txt) { - struct passwd pwres, *pass; +#if defined(HAVE_GETPW_R_POSIX) || defined(HAVE_GETPW_R_DRAFT) + struct passwd pwres; + char pwbuf[1024]; +#endif + struct passwd *pass; char *temp; size_t len = 0; - char pwbuf[1024]; if (txt[0] != '~') return (strdup(txt)); |
