Fix some compiler warnings

pull/2042/head
René Cannaò 7 years ago
parent 2df11ec320
commit 059579f5a2

@ -2679,7 +2679,7 @@ SQLite3_result * MySQL_HostGroups_Manager::SQL3_Free_Connections() {
delete conn;
}
char buf[1024];
for (l=0; l<mysrvc->ConnectionsFree->conns_length(); l++) {
for (l=0; l < (int) mysrvc->ConnectionsFree->conns_length(); l++) {
char **pta=(char **)malloc(sizeof(char *)*colnum);
MySQL_Connection *conn = mysrvc->ConnectionsFree->index(l);
sprintf(buf,"%d", conn->fd);

@ -537,8 +537,8 @@ void MySQL_STMT_Manager_v14::ref_count_client(uint64_t _stmt_id ,int _v, bool lo
(uint64_t *)malloc(max_purge * sizeof(uint64_t));
for (std::map<uint64_t, MySQL_STMT_Global_info *>::iterator it =
map_stmt_id_to_info.begin();
it != map_stmt_id_to_info.end(); ++it) {
if ( (i == (max_purge - 1)) || (i == (num_client_count_zero - 1)) ) {
it != map_stmt_id_to_info.end(); ++it) {
if ( (i == (max_purge - 1)) || (i == ((int)num_client_count_zero - 1)) ) {
break; // nothing left to clean up
}
MySQL_STMT_Global_info *a = it->second;

@ -1546,7 +1546,7 @@ bool MySQL_Protocol::process_pkt_handshake_response(unsigned char *pkt, unsigned
auth_plugin_id = 2;
}
}
__switch_auth_plugin:
//__switch_auth_plugin:
if (auth_plugin_id == 0) {
if ((*myds)->switching_auth_stage == 0) {
(*myds)->switching_auth_stage = 1;
@ -2279,7 +2279,7 @@ unsigned int MySQL_ResultSet::add_row2(MYSQL_ROWS *row, unsigned char *offset) {
}
void MySQL_ResultSet::add_eof() {
PtrSize_t pkt;
//PtrSize_t pkt;
if (myprot) {
unsigned int nTrx=myds->sess->NumActiveTransactions();
uint16_t setStatus = (nTrx ? SERVER_STATUS_IN_TRANS : 0 );

@ -803,7 +803,7 @@ void MySQL_Session::generate_proxysql_internal_session_json(json &j) {
}
void MySQL_Session::return_proxysql_internal(PtrSize_t *pkt) {
int l = 0;
unsigned int l = 0;
l = strlen((char *)"PROXYSQL INTERNAL SESSION");
if (pkt->size==(5+l) && strncasecmp((char *)"PROXYSQL INTERNAL SESSION", (char *)pkt->ptr+5, l)==0) {
json j;

@ -24,7 +24,6 @@ struct bio_st {
CRYPTO_RWLOCK *lock;
};
#define RESULTSET_BUFLEN_DS_16K 16000
#define RESULTSET_BUFLEN_DS_1M 1000*1024

Loading…
Cancel
Save