Skip to content

Commit 7cecc90

Browse files
committed
Bug#24296291: FIX -WUNUSED-PARAMETER WARNINGS
Patch #22: As a final step, remove disabling of the -Wunused-parameter GCC/Clang compiler warning option.
1 parent 8cd7fe9 commit 7cecc90

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

cmake/maintainer.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ SET(MY_C_WARNING_FLAGS
4141
"${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")
4242

4343
# Common warning flags for G++ and Clang++
44-
SET(MY_CXX_WARNING_FLAGS
45-
"${MY_WARNING_FLAGS} -Woverloaded-virtual -Wno-unused-parameter")
44+
SET(MY_CXX_WARNING_FLAGS "${MY_WARNING_FLAGS} -Woverloaded-virtual")
4645

4746
# GCC bug #36750 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750)
4847
# Remove when we require GCC >= 5.1 everywhere.

sql/sql_table.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4629,13 +4629,11 @@ const char* find_fk_supporting_index(Alter_info *alter_info,
46294629
problems with duplicate foreign key names while we have two
46304630
definitions of the same table.
46314631
4632-
@param thd Thread handle.
46334632
@param table_def Table object.
46344633
@param alter_ctx ALTER TABLE runtime context.
46354634
*/
46364635

4637-
static void restore_foreign_key_names(THD *thd,
4638-
dd::Table *table_def,
4636+
static void restore_foreign_key_names(dd::Table *table_def,
46394637
const Alter_table_ctx &alter_ctx)
46404638
{
46414639
// Restore the original name for pre-existing foreign keys
@@ -8739,7 +8737,7 @@ static bool mysql_inplace_alter_table(THD *thd,
87398737
table definition. Since we now have only one defintion, the names
87408738
can be restored.
87418739
*/
8742-
restore_foreign_key_names(thd, altered_table_def, *alter_ctx);
8740+
restore_foreign_key_names(altered_table_def, *alter_ctx);
87438741

87448742
if (thd->dd_client()->update(altered_table_def))
87458743
goto cleanup2;
@@ -11941,7 +11939,7 @@ bool mysql_alter_table(THD *thd, const char *new_db, const char *new_name,
1194111939
goto err_with_mdl;
1194211940
DBUG_ASSERT(new_table != nullptr);
1194311941

11944-
restore_foreign_key_names(thd, new_table, alter_ctx);
11942+
restore_foreign_key_names(new_table, alter_ctx);
1194511943
if (thd->dd_client()->update(new_table))
1194611944
goto err_with_mdl;
1194711945

0 commit comments

Comments
 (0)