summaryrefslogtreecommitdiffstats
path: root/login-utils/checktty.c
diff options
context:
space:
mode:
authorSami Kerola2011-06-25 12:27:43 +0200
committerSami Kerola2011-06-25 12:27:43 +0200
commit406ae26354d9760468c60133756657be9f8bfbbe (patch)
treea525dbffb8520f259d05bcb9b40801c4b249dbeb /login-utils/checktty.c
parentdocs: tell mount/* is in maintenance mode (diff)
downloadkernel-qcow2-util-linux-406ae26354d9760468c60133756657be9f8bfbbe.tar.gz
kernel-qcow2-util-linux-406ae26354d9760468c60133756657be9f8bfbbe.tar.xz
kernel-qcow2-util-linux-406ae26354d9760468c60133756657be9f8bfbbe.zip
checktty: fix unused parameters
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/checktty.c')
-rw-r--r--login-utils/checktty.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/login-utils/checktty.c b/login-utils/checktty.c
index a8c5247c6..69828281b 100644
--- a/login-utils/checktty.c
+++ b/login-utils/checktty.c
@@ -81,7 +81,7 @@ am_in_group(char *group)
}
static void
-find_groups(gid_t defgrp, const char *user)
+find_groups()
{
num_groups = getgroups(NGROUPS_MAX, mygroups);
}
@@ -292,11 +292,20 @@ hnmatch(const char *hn, const char *pat)
char hostaddress[16];
sa_family_t hostfamily;
char *hostname;
-void sleepexit(int eval) {} /* dummy for this test */
-void badlogin(const char *s) {} /* dummy for this test */
+
+void sleepexit(int eval __attribute__ ((__unused__)))
+{
+ /* dummy for this test */
+}
+
+void badlogin(const char *s __attribute__ ((__unused__)))
+{
+ /* dummy for this test */
+}
int
-main(int argc, char **argv)
+main(int argc __attribute__ ((__unused__)),
+ char **argv __attribute__ ((__unused__)))
{
struct addrinfo hints, *info = NULL;
struct addrexp {
@@ -497,7 +506,7 @@ checktty(const char *user, const char *tty, struct passwd *pwd)
return; /* misspelled username handled elsewhere */
}
- find_groups(pwd->pw_gid, user);
+ find_groups();
defaultbuf[0] = 0;
while(fgets(buf, 255, f)) {