mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Several fixes revelaled by Intel compiler.
cmd-line-utils/readline/complete.c: Added a cast. dbug/my_main.c: Added an include to avoid implicit declaration of my_thread_global_init() include/my_global.h: undef cannot be used on this predefined name. Since it is a custom fix for gcc 2.8.0, let's make it only effective in that case. include/my_sys.h: Added a new type, TYPE_NOT_SET. myisam/ft_boolean_search.c: Added casts. myisam/mi_key.c: Added cast. myisam/mi_open.c: Added cast. Changed function types. myisam/mi_test1.c: Added cast. myisam/myisamchk.c: Added cast. myisam/myisamdef.h: Changed function type. myisam/myisampack.c: Added casts. myisam/sp_key.c: Added cast. mysys/mf_iocache.c: Fixed invalid use of 0 to info->type. According to comment it should not have been set, but in earlier code by setting it to 0 would have been same as setting it to READ_CACHE. This probably was not desired, potential bug. server-tools/instance-manager/instance_options.cc: Fixed a typo. server-tools/instance-manager/protocol.cc: Changed enum to int. Changed char to uchar. Added casts. sql/mysql_priv.h: Bit overflow. sql/sql_base.cc: Removed unused label. The code below label was unused too, because there is a return just before. sql/sql_parse.cc: Removed unneccessary extra argument.
This commit is contained in:
@ -469,7 +469,7 @@ int Instance_options::add_option(const char* option)
|
||||
case SAVE_WHOLE:
|
||||
*(selected_options->value)= tmp;
|
||||
return 0;
|
||||
defaut:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ int net_send_error(struct st_net *net, uint sql_errno)
|
||||
MYSQL_ERRMSG_SIZE]; // message
|
||||
char *pos= buff;
|
||||
|
||||
enum { ERROR_PACKET_CODE= 255 };
|
||||
int ERROR_PACKET_CODE= 255;
|
||||
*pos++= ERROR_PACKET_CODE;
|
||||
int2store(pos, sql_errno);
|
||||
pos+= 2;
|
||||
@ -95,7 +95,7 @@ int net_send_error_323(struct st_net *net, uint sql_errno)
|
||||
MYSQL_ERRMSG_SIZE]; // message
|
||||
char *pos= buff;
|
||||
|
||||
enum { ERROR_PACKET_CODE= 255 };
|
||||
int ERROR_PACKET_CODE= 255;
|
||||
*pos++= ERROR_PACKET_CODE;
|
||||
int2store(pos, sql_errno);
|
||||
pos+= 2;
|
||||
@ -148,14 +148,14 @@ int store_to_protocol_packet(Buffer *buf, const char *string, uint *position)
|
||||
|
||||
int send_eof(struct st_net *net)
|
||||
{
|
||||
char buff[1 + /* eof packet code */
|
||||
2 + /* warning count */
|
||||
2]; /* server status */
|
||||
uchar buff[1 + /* eof packet code */
|
||||
2 + /* warning count */
|
||||
2]; /* server status */
|
||||
|
||||
buff[0]=254;
|
||||
int2store(buff+1, 0);
|
||||
int2store(buff+3, 0);
|
||||
return my_net_write(net, buff, sizeof buff);
|
||||
return my_net_write(net, (char*) buff, sizeof buff);
|
||||
}
|
||||
|
||||
int send_fields(struct st_net *net, LIST *fields)
|
||||
@ -195,7 +195,7 @@ int send_fields(struct st_net *net, LIST *fields)
|
||||
int2store(send_buff.buffer + position, 1); /* charsetnr */
|
||||
int4store(send_buff.buffer + position + 2,
|
||||
field->length); /* field length */
|
||||
send_buff.buffer[position+6]= FIELD_TYPE_STRING; /* type */
|
||||
send_buff.buffer[position+6]= (uint) FIELD_TYPE_STRING; /* type */
|
||||
int2store(send_buff.buffer + position + 7, 0); /* flags */
|
||||
send_buff.buffer[position + 9]= (char) 0; /* decimals */
|
||||
send_buff.buffer[position + 10]= 0;
|
||||
|
Reference in New Issue
Block a user