1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed compiler warnings from gcc and clang 5.0.1

This commit is contained in:
Monty
2020-05-12 18:56:41 +03:00
parent 9bf479b0cf
commit 4ea171ffab
16 changed files with 46 additions and 46 deletions

View File

@ -158,8 +158,8 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info)
gss_buffer_desc client_name_buf, input, output;
char *client_name_str;
const char *user= 0;
size_t userlen;
int use_full_name;
size_t userlen= 0;
int use_full_name= 0;
/* server acquires credential */
major= gss_acquire_cred(&minor, service_name, GSS_C_INDEFINITE,
@ -244,7 +244,7 @@ int auth_server(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *auth_info)
&& userlen < client_name_buf.length
&& client_name_str[userlen] == '@'))
{
if (strncmp(client_name_str, user, userlen) == 0)
if (user && strncmp(client_name_str, user, userlen) == 0)
{
rc= CR_OK;
}