mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-6650 - LINT_INIT emits code in non-debug builds
Replaced all references to LINT_INIT with UNINIT_VAR and LINT_INIT_STRUCT. Removed LINT_INIT macro.
This commit is contained in:
@@ -3040,9 +3040,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
||||
init_pager();
|
||||
char last_char= 0;
|
||||
|
||||
int num_name= 0, num_cat= 0;
|
||||
LINT_INIT(num_name);
|
||||
LINT_INIT(num_cat);
|
||||
int UNINIT_VAR(num_name), UNINIT_VAR(num_cat);
|
||||
|
||||
if (num_fields == 2)
|
||||
{
|
||||
@@ -3179,7 +3177,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
||||
}
|
||||
|
||||
/* Remove garbage for nicer messages */
|
||||
LINT_INIT(buff[0]);
|
||||
LINT_INIT_STRUCT(buff[0]);
|
||||
remove_cntrl(*buffer);
|
||||
|
||||
if (buffer->is_empty())
|
||||
@@ -4698,8 +4696,7 @@ com_status(String *buffer __attribute__((unused)),
|
||||
const char *status_str;
|
||||
char buff[40];
|
||||
ulonglong id;
|
||||
MYSQL_RES *result;
|
||||
LINT_INIT(result);
|
||||
MYSQL_RES *UNINIT_VAR(result);
|
||||
|
||||
if (mysql_real_query_for_lazy(
|
||||
C_STRING_WITH_LEN("select DATABASE(), USER() limit 1")))
|
||||
@@ -5258,8 +5255,7 @@ static void init_username()
|
||||
my_free(full_username);
|
||||
my_free(part_username);
|
||||
|
||||
MYSQL_RES *result;
|
||||
LINT_INIT(result);
|
||||
MYSQL_RES *UNINIT_VAR(result);
|
||||
if (!mysql_query(&mysql,"select USER()") &&
|
||||
(result=mysql_use_result(&mysql)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user