From: Sami Kerola Date: Sat, 25 Jun 2011 10:27:43 +0000 (+0200) Subject: checktty: fix unused parameters X-Git-Tag: v2.20-rc1~138^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=406ae26354d9760468c60133756657be9f8bfbbe;p=thirdparty%2Futil-linux.git checktty: fix unused parameters Signed-off-by: Sami Kerola --- diff --git a/login-utils/checktty.c b/login-utils/checktty.c index a8c5247c67..69828281ba 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)) {