~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/item_cmpfunc.cc

Bunch of warning cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
802
802
*/
803
803
 
804
804
ulonglong
805
 
get_time_value(THD *thd, Item ***item_arg, Item **cache_arg,
806
 
               Item *warn_item, bool *is_null)
 
805
get_time_value(THD *thd __attribute__((__unused__)),
 
806
               Item ***item_arg, Item **cache_arg,
 
807
               Item *warn_item __attribute__((__unused__)),
 
808
               bool *is_null)
807
809
{
808
810
  ulonglong value;
809
811
  Item *item= **item_arg;
1462
1464
}
1463
1465
 
1464
1466
 
1465
 
bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
 
1467
bool Item_in_optimizer::fix_left(THD *thd, Item **ref __attribute__((__unused__)))
1466
1468
{
1467
1469
  if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) ||
1468
1470
      (!cache && !(cache= Item_cache::get_cache(args[0]))))
2572
2574
           failed
2573
2575
*/
2574
2576
 
2575
 
Item *Item_func_case::find_item(String *str)
 
2577
Item *Item_func_case::find_item(String *str __attribute__((__unused__)))
2576
2578
{
2577
2579
  uint value_added_map= 0;
2578
2580
 
3023
3025
    0           left argument is equal to the right argument.
3024
3026
    1           left argument is greater than the right argument.
3025
3027
*/
3026
 
int cmp_longlong(void *cmp_arg, 
 
3028
int cmp_longlong(void *cmp_arg __attribute__((__unused__)),
3027
3029
                 in_longlong::packed_longlong *a,
3028
3030
                 in_longlong::packed_longlong *b)
3029
3031
{
3048
3050
    return cmp_longs (a->val, b->val);
3049
3051
}
3050
3052
 
3051
 
static int cmp_double(void *cmp_arg, double *a,double *b)
 
3053
static int cmp_double(void *cmp_arg __attribute__((__unused__)), double *a,double *b)
3052
3054
{
3053
3055
  return *a < *b ? -1 : *a == *b ? 0 : 1;
3054
3056
}
3055
3057
 
3056
 
static int cmp_row(void *cmp_arg, cmp_item_row *a, cmp_item_row *b)
 
3058
static int cmp_row(void *cmp_arg __attribute__((__unused__)), cmp_item_row *a, cmp_item_row *b)
3057
3059
{
3058
3060
  return a->compare(b);
3059
3061
}
3060
3062
 
3061
3063
 
3062
 
static int cmp_decimal(void *cmp_arg, my_decimal *a, my_decimal *b)
 
3064
static int cmp_decimal(void *cmp_arg __attribute__((__unused__)), my_decimal *a, my_decimal *b)
3063
3065
{
3064
3066
  /*
3065
3067
    We need call of fixing buffer pointer, because fast sort just copy
3136
3138
  return (uchar*) item->val_str(&tmp);
3137
3139
}
3138
3140
 
3139
 
in_row::in_row(uint elements, Item * item)
 
3141
in_row::in_row(uint elements, Item * item __attribute__((__unused__)))
3140
3142
{
3141
3143
  base= (char*) new cmp_item_row[count= elements];
3142
3144
  size= sizeof(cmp_item_row);
3896
3898
 
3897
3899
 
3898
3900
bool
3899
 
Item_cond::fix_fields(THD *thd, Item **ref)
 
3901
Item_cond::fix_fields(THD *thd, Item **ref __attribute__((__unused__)))
3900
3902
{
3901
3903
  DBUG_ASSERT(fixed == 0);
3902
3904
  List_iterator<Item> li(list);
3973
3975
}
3974
3976
 
3975
3977
 
3976
 
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref)
 
3978
void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref __attribute__((__unused__)))
3977
3979
{
3978
3980
  List_iterator<Item> li(list);
3979
3981
  Item *item;
4825
4827
    NULL if we cannot apply NOT transformation (see Item::neg_transformer()).
4826
4828
*/
4827
4829
 
4828
 
Item *Item_func_not::neg_transformer(THD *thd)  /* NOT(x)  ->  x */
 
4830
Item *Item_func_not::neg_transformer(THD *thd __attribute__((__unused__)))      /* NOT(x)  ->  x */
4829
4831
{
4830
4832
  return args[0];
4831
4833
}
4832
4834
 
4833
4835
 
4834
 
Item *Item_bool_rowready_func2::neg_transformer(THD *thd)
 
4836
Item *Item_bool_rowready_func2::neg_transformer(THD *thd __attribute__((__unused__)))
4835
4837
{
4836
4838
  Item *item= negated_item();
4837
4839
  return item;
4841
4843
/**
4842
4844
  a IS NULL  ->  a IS NOT NULL.
4843
4845
*/
4844
 
Item *Item_func_isnull::neg_transformer(THD *thd)
 
4846
Item *Item_func_isnull::neg_transformer(THD *thd __attribute__((__unused__)))
4845
4847
{
4846
4848
  Item *item= new Item_func_isnotnull(args[0]);
4847
4849
  return item;
4851
4853
/**
4852
4854
  a IS NOT NULL  ->  a IS NULL.
4853
4855
*/
4854
 
Item *Item_func_isnotnull::neg_transformer(THD *thd)
 
4856
Item *Item_func_isnotnull::neg_transformer(THD *thd __attribute__((__unused__)))
4855
4857
{
4856
4858
  Item *item= new Item_func_isnull(args[0]);
4857
4859
  return item;
4876
4878
}
4877
4879
 
4878
4880
 
4879
 
Item *Item_func_nop_all::neg_transformer(THD *thd)
 
4881
Item *Item_func_nop_all::neg_transformer(THD *thd __attribute__((__unused__)))
4880
4882
{
4881
4883
  /* "NOT (e $cmp$ ANY (SELECT ...)) -> e $rev_cmp$" ALL (SELECT ...) */
4882
4884
  Item_func_not_all *new_item= new Item_func_not_all(args[0]);
4887
4889
  return new_item;
4888
4890
}
4889
4891
 
4890
 
Item *Item_func_not_all::neg_transformer(THD *thd)
 
4892
Item *Item_func_not_all::neg_transformer(THD *thd __attribute__((__unused__)))
4891
4893
{
4892
4894
  /* "NOT (e $cmp$ ALL (SELECT ...)) -> e $rev_cmp$" ANY (SELECT ...) */
4893
4895
  Item_func_nop_all *new_item= new Item_func_nop_all(args[0]);
5127
5129
  }
5128
5130
}
5129
5131
 
5130
 
bool Item_equal::fix_fields(THD *thd, Item **ref)
 
5132
bool Item_equal::fix_fields(THD *thd __attribute__((__unused__)), Item **ref __attribute__((__unused__)))
5131
5133
{
5132
5134
  List_iterator_fast<Item_field> li(fields);
5133
5135
  Item *item;