I came across the following gcc warning (6.3.1)

sql/item_sum.cc: In member function ‘virtual bool
Item_func_group_concat::fix_fields(THD*, Item**)’:
sql/item_sum.cc:3478:5: warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
     if ((!args[i]->fixed &&
     ^~
sql/item_sum.cc:3482:7: note: ...this statement, but the latter is
misleadingly indented as if it is guarded by the ‘if’
       with_subselect|= args[i]->with_subselect;
       ^~~~~~~~~~~~~~

The with_subselect line was added in 950abd526

In context it is:

Item_func_group_concat::fix_fields(THD *thd, Item **ref)
{
...
  for (i=0 ; i < arg_count ; i++)
  {
    if ((!args[i]->fixed &&
         args[i]->fix_fields(thd, args + i)) ||
        args[i]->check_cols(1))
      return TRUE;
      with_subselect|= args[i]->with_subselect;
  }


While removing the indent would fix the warning, I'd like someone to
check this line should be after the IF statement rather than before.


_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to