From 4d61f1247a1b6a86570cb03d3450930a78d689b3 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 29 Jan 2020 16:41:04 +0200 Subject: Fixed compiler warnings from gcc 7.4.1 - Fixed possible error in rocksdb/rdb_datadic.cc --- plugin/auth_pam/auth_pam_tool.c | 6 ++++-- plugin/auth_pam/testing/pam_mariadb_mtr.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'plugin/auth_pam') diff --git a/plugin/auth_pam/auth_pam_tool.c b/plugin/auth_pam/auth_pam_tool.c index 624b6880933..225f35a6624 100644 --- a/plugin/auth_pam/auth_pam_tool.c +++ b/plugin/auth_pam/auth_pam_tool.c @@ -16,6 +16,7 @@ #include #include +#include #include struct param { @@ -62,7 +63,7 @@ typedef struct st_mysql_server_auth_info #include "auth_pam_base.c" -int main(int argc, char **argv) +int main(int argc __attribute__((unused)), char **argv __attribute__((unused))) { struct param param; MYSQL_SERVER_AUTH_INFO info; @@ -70,7 +71,8 @@ int main(int argc, char **argv) int res; char a_buf[MYSQL_USERNAME_LENGTH + 1 + 1024]; - (void) setreuid(0, 0); + if ((res= setreuid(0, 0))) + fprintf(stderr, "Got error %d from setreuid()\n", (int) errno); if (read(0, &field, 1) < 1) return -1; diff --git a/plugin/auth_pam/testing/pam_mariadb_mtr.c b/plugin/auth_pam/testing/pam_mariadb_mtr.c index c0e07232027..2075d5fdbf3 100644 --- a/plugin/auth_pam/testing/pam_mariadb_mtr.c +++ b/plugin/auth_pam/testing/pam_mariadb_mtr.c @@ -15,7 +15,7 @@ #define N 3 -int pam_sm_authenticate(pam_handle_t *pamh, int flags, +int pam_sm_authenticate(pam_handle_t *pamh, int flags __attribute__((unused)), int argc, const char *argv[]) { struct pam_conv *conv; @@ -72,8 +72,10 @@ ret: return retval; } -int pam_sm_setcred(pam_handle_t *pamh, int flags, - int argc, const char *argv[]) +int pam_sm_setcred(pam_handle_t *pamh __attribute__((unused)), + int flags __attribute__((unused)), + int argc __attribute__((unused)), + const char *argv[] __attribute__((unused))) { return PAM_SUCCESS; -- cgit v1.2.1