mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
This commit is contained in:
@ -534,7 +534,7 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags)
|
||||
int error, table_type;
|
||||
bool error_given;
|
||||
File file;
|
||||
uchar head[288], *disk_buff;
|
||||
uchar head[288];
|
||||
char path[FN_REFLEN];
|
||||
MEM_ROOT **root_ptr, *old_root;
|
||||
DBUG_ENTER("open_table_def");
|
||||
@ -543,7 +543,6 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags)
|
||||
|
||||
error= 1;
|
||||
error_given= 0;
|
||||
disk_buff= NULL;
|
||||
|
||||
strxmov(path, share->normalized_path.str, reg_ext, NullS);
|
||||
if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0)
|
||||
|
Reference in New Issue
Block a user