From e9803436f78b20cb4f3ab7646585f20f63a7078d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 24 Apr 2014 06:21:57 +0200 Subject: enable more warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/auth/pam.c | 7 +++++-- src/login.h | 2 +- src/quit.h | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/auth/pam.c b/src/auth/pam.c index 94cf28a..d61e7c2 100644 --- a/src/auth/pam.c +++ b/src/auth/pam.c @@ -32,9 +32,9 @@ #define __failed(RC) ((RC) != PAM_SUCCESS) -void quit_pam(int sig); +static void quit_pam(int sig) __attribute__((noreturn)); -int conv_pam(int num_msg, const struct pam_message** msg, struct pam_response** resp, void* appdata_ptr); +static int conv_pam(int num_msg, const struct pam_message** msg, struct pam_response** resp, void* appdata_ptr); /** @@ -73,6 +73,8 @@ static char auto_authenticated = 1; static char* (*passphrase_reader)(void) = NULL; +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" /** * Exit if a PAM instruction failed * @@ -90,6 +92,7 @@ static void do_pam(int rc) _exit(1); } } +# pragma GCC diagnostic pop /** diff --git a/src/login.h b/src/login.h index e335e7c..e7f2a82 100644 --- a/src/login.h +++ b/src/login.h @@ -56,7 +56,7 @@ void set_environ(struct passwd* entry, char preserve_env); * * @param entry The user entry in the password file */ -void exec_shell(struct passwd* entry); +void exec_shell(struct passwd* entry) __attribute__((noreturn)); #endif diff --git a/src/quit.h b/src/quit.h index d42c524..cbae77c 100644 --- a/src/quit.h +++ b/src/quit.h @@ -25,14 +25,14 @@ * * @param signal The signal the program received */ -void timeout_quit(int signal); +void timeout_quit(int signal) __attribute__((noreturn)); /** * Quit function for user aborts * * @param signal The signal the program received */ -void user_quit(int signal); +void user_quit(int signal) __attribute__((noreturn)); #endif -- cgit v1.2.3-70-g09d2