]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login: fix compiler warnings [-Wunused-parameter -Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 13:36:17 +0000 (15:36 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 13:36:17 +0000 (15:36 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/login.c

index 74e0cdd15a1c6f863f127127c13bc2abcfe0a3c1..554e5a28cca0bd24504ace24d8e79450eb23e261 100644 (file)
@@ -342,7 +342,7 @@ logaudit(const char *tty, const char *username, const char *hostname,
 
        audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN,
                NULL, "login", username ? username : "(unknown)",
-               pwd ? pwd->pw_uid : -1, hostname, NULL, tty, status);
+               pwd ? pwd->pw_uid : (unsigned int) -1, hostname, NULL, tty, status);
 
        close(audit_fd);
 }
@@ -1342,7 +1342,7 @@ getloginname(void) {
  */
 
 static void
-timedout2(int sig) {
+timedout2(int sig __attribute__((__unused__))) {
        struct termios ti;
 
        /* reset echo */
@@ -1353,7 +1353,7 @@ timedout2(int sig) {
 }
 
 static void
-timedout(int sig) {
+timedout(int sig __attribute__((__unused__))) {
        signal(SIGALRM, timedout2);
        alarm(10);
        warnx(_("timed out after %d seconds"), timeout);
@@ -1416,7 +1416,7 @@ motd(void) {
 }
 
 void
-sigint(int sig) {
+sigint(int sig  __attribute__((__unused__))) {
     longjmp(motdinterrupt, 1);
 }