Skip to content

Commit

Permalink
Fixed compiler warning: ISO C++ forbids converting a string constant …
Browse files Browse the repository at this point in the history
…to char pointer
  • Loading branch information
renecannao committed Jul 3, 2019
1 parent 6e69ca0 commit 37d79ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/MySQL_Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ void MySQL_Logger::log_audit_entry(log_event_type _et, MySQL_Session *sess, MySQ
}
cl=strlen(ca);

char *un = "";
char *sn = "";
char *un = (char *)"";
char *sn = (char *)"";
if (ui) {
if (ui->username) {
un = ui->username;
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4080,7 +4080,7 @@ void MySQL_Session::handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(
proxy_debug(PROXY_DEBUG_MYSQL_CONNECTION, 5, "Too many connections\n");
client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,_pid,1040,(char *)"08004", (char *)"Too many connections", true);
proxy_warning("mysql-max_connections reached. Returning 'Too many connections'\n");
GloMyLogger->log_audit_entry(PROXYSQL_MYSQL_AUTH_ERR, this, NULL, "mysql-max_connections reached");
GloMyLogger->log_audit_entry(PROXYSQL_MYSQL_AUTH_ERR, this, NULL, (char *)"mysql-max_connections reached");
__sync_fetch_and_add(&MyHGM->status.access_denied_max_connections, 1);
} else { // see issue #794
__sync_fetch_and_add(&MyHGM->status.access_denied_max_user_connections, 1);
Expand Down

0 comments on commit 37d79ad

Please sign in to comment.