Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit fix unused variable warnings on systems without ...



details:   https://anonhg.NetBSD.org/src/rev/70b61f2526e0
branches:  trunk
changeset: 767739:70b61f2526e0
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 28 17:33:55 2011 +0000

description:
fix unused variable warnings on systems without _r functions

diffstat:

 lib/libedit/filecomplete.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 176dbff45394 -r 70b61f2526e0 lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Thu Jul 28 17:33:39 2011 +0000
+++ b/lib/libedit/filecomplete.c        Thu Jul 28 17:33:55 2011 +0000
@@ -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));



Home | Main Index | Thread Index | Old Index