Module Name: src
Committed By: christos
Date: Thu Jul 28 17:33:56 UTC 2011
Modified Files:
src/lib/libedit: filecomplete.c
Log Message:
fix unused variable warnings on systems without _r functions
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libedit/filecomplete.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.24 src/lib/libedit/filecomplete.c:1.25
--- src/lib/libedit/filecomplete.c:1.24 Wed Jul 27 20:50:23 2011
+++ src/lib/libedit/filecomplete.c Thu Jul 28 13:33:55 2011
@@ -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 @@
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));