summaryrefslogtreecommitdiff
path: root/src/who.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-10-12 20:39:33 +0000
committerJim Meyering <jim@meyering.net>2006-10-12 20:39:33 +0000
commit9f70d6021b216fc36b5260a7a18f00f0acc27482 (patch)
tree5b5f6757d68980903bb8f8bf60c9384728dbe887 /src/who.c
parent5f60ffcfcfef1a7a126792b7748c7072c8ee20be (diff)
downloadcoreutils-9f70d6021b216fc36b5260a7a18f00f0acc27482.tar.xz
* configure.ac: Avoid compiler warnings about default return
type in function definitions and unused variables in tests. * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed if this is #defined.
Diffstat (limited to 'src/who.c')
-rw-r--r--src/who.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/who.c b/src/who.c
index 211b08fb7..db3af6e18 100644
--- a/src/who.c
+++ b/src/who.c
@@ -320,7 +320,9 @@ print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)
char mesg;
char idlestr[IDLESTR_LEN + 1];
static char *hoststr;
+#if HAVE_UT_HOST
static size_t hostlen;
+#endif
#define DEV_DIR_WITH_TRAILING_SLASH "/dev/"
#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)