aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 11:16:40 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 11:33:52 +0200
commit0d34f828de4868b0ec4a8bb84a72121047879b1e (patch)
tree2cff02a854a12febe18b3075505eaba048ed6cc2 /src
parent36c2fa1c16d1e7d9605018aab2b1c1af85c2a6bf (diff)
downloadlibpam-x2go-0d34f828de4868b0ec4a8bb84a72121047879b1e.tar.gz
libpam-x2go-0d34f828de4868b0ec4a8bb84a72121047879b1e.tar.bz2
libpam-x2go-0d34f828de4868b0ec4a8bb84a72121047879b1e.zip
src/pam-x2go.c: Mark unused function arguments as such.
This resolves: pam-x2go.c:228:46: error: unused parameter 'flags' [-Werror,-Wunused-parameter] pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:228:57: error: unused parameter 'argc' [-Werror,-Wunused-parameter] pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:228:76: error: unused parameter 'argv' [-Werror,-Wunused-parameter] pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:293:46: error: unused parameter 'flags' [-Werror,-Wunused-parameter] pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:293:57: error: unused parameter 'argc' [-Werror,-Wunused-parameter] pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:293:77: error: unused parameter 'argv' [-Werror,-Wunused-parameter] pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:360:47: error: unused parameter 'flags' [-Werror,-Wunused-parameter] pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:360:58: error: unused parameter 'argc' [-Werror,-Wunused-parameter] pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:360:77: error: unused parameter 'argv' [-Werror,-Wunused-parameter] pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv) ^ pam-x2go.c:440:31: error: unused parameter 'pamh' [-Werror,-Wunused-parameter] pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:440:41: error: unused parameter 'flags' [-Werror,-Wunused-parameter] pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:440:52: error: unused parameter 'argc' [-Werror,-Wunused-parameter] pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ pam-x2go.c:440:72: error: unused parameter 'argv' [-Werror,-Wunused-parameter] pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv) ^ 13 errors generated.
Diffstat (limited to 'src')
-rw-r--r--src/pam-x2go.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pam-x2go.c b/src/pam-x2go.c
index f9ae42b..ab627ac 100644
--- a/src/pam-x2go.c
+++ b/src/pam-x2go.c
@@ -225,7 +225,7 @@ get_item (pam_handle_t * pamh, int type)
/* Authenticate. We need to make sure we have a user account, that
there are remote accounts and then verify them with X2Go */
PAM_EXTERN int
-pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, const char **argv)
+pam_sm_authenticate (pam_handle_t *pamh, int __attribute__((unused)) flags, int __attribute__((unused)) argc, const char __attribute__((unused)) **argv)
{
char * username = NULL;
char * password = NULL;
@@ -290,7 +290,7 @@ pid_t session_pid = 0;
give the credentials to the session itself so that it can startup the
PyHoca (X2Go) client for the login */
PAM_EXTERN int
-pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv)
+pam_sm_open_session (pam_handle_t *pamh, int __attribute__((unused)) flags, int __attribute__((unused)) argc, const char __attribute__((unused)) **argv)
{
char * username = NULL;
char * password = NULL;
@@ -357,7 +357,7 @@ done:
/* Close Session. Make sure our little guy has died so he doesn't become
a zombie and eat things. */
PAM_EXTERN int
-pam_sm_close_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
+pam_sm_close_session (pam_handle_t *pamh, int __attribute__((unused)) flags, int __attribute__((unused)) argc, const char __attribute__((unused)) **argv)
{
if (session_pid == 0) {
return PAM_IGNORE;
@@ -437,7 +437,7 @@ unpriveleged_kill (struct passwd * pwdent)
/* LightDM likes to have this function around, but we don't need it as we
don't have a token hanging around. */
PAM_EXTERN int
-pam_sm_setcred (pam_handle_t *pamh, int flags, int argc, const char ** argv)
+pam_sm_setcred (pam_handle_t __attribute__((unused)) *pamh, int __attribute__((unused)) flags, int __attribute__((unused)) argc, const char __attribute__((unused)) **argv)
{
return PAM_SUCCESS;
}