~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/handler.cc

Bunch of warning cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
489
489
  DBUG_RETURN(error);
490
490
}
491
491
 
492
 
static my_bool dropdb_handlerton(THD *unused1, plugin_ref plugin,
 
492
static my_bool dropdb_handlerton(THD *unused1 __attribute__((__unused__)),
 
493
                                 plugin_ref plugin,
493
494
                                 void *path)
494
495
{
495
496
  handlerton *hton= plugin_data(plugin, handlerton *);
506
507
 
507
508
 
508
509
static my_bool closecon_handlerton(THD *thd, plugin_ref plugin,
509
 
                                   void *unused)
 
510
                                   void *unused __attribute__((__unused__)))
510
511
{
511
512
  handlerton *hton= plugin_data(plugin, handlerton *);
512
513
  /*
1237
1238
  int result;
1238
1239
};
1239
1240
 
1240
 
static my_bool xacommit_handlerton(THD *unused1, plugin_ref plugin,
 
1241
static my_bool xacommit_handlerton(THD *unused1 __attribute__((__unused__)),
 
1242
                                   plugin_ref plugin,
1241
1243
                                   void *arg)
1242
1244
{
1243
1245
  handlerton *hton= plugin_data(plugin, handlerton *);
1249
1251
  return false;
1250
1252
}
1251
1253
 
1252
 
static my_bool xarollback_handlerton(THD *unused1, plugin_ref plugin,
 
1254
static my_bool xarollback_handlerton(THD *unused1 __attribute__((__unused__)),
 
1255
                                     plugin_ref plugin,
1253
1256
                                     void *arg)
1254
1257
{
1255
1258
  handlerton *hton= plugin_data(plugin, handlerton *);
1355
1358
  bool dry_run;
1356
1359
};
1357
1360
 
1358
 
static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
 
1361
static my_bool xarecover_handlerton(THD *unused __attribute__((__unused__)),
 
1362
                                    plugin_ref plugin,
1359
1363
                                    void *arg)
1360
1364
{
1361
1365
  handlerton *hton= plugin_data(plugin, handlerton *);
1550
1554
    always 0
1551
1555
*/
1552
1556
static my_bool release_temporary_latches(THD *thd, plugin_ref plugin,
1553
 
                                 void *unused)
 
1557
                                         void *unused __attribute__((__unused__)))
1554
1558
{
1555
1559
  handlerton *hton= plugin_data(plugin, handlerton *);
1556
1560
 
1715
1719
}
1716
1720
 
1717
1721
 
1718
 
static my_bool flush_handlerton(THD *thd, plugin_ref plugin,
1719
 
                                void *arg)
 
1722
static my_bool flush_handlerton(THD *thd __attribute__((__unused__)),
 
1723
                                plugin_ref plugin,
 
1724
                                void *arg __attribute__((__unused__)))
1720
1725
{
1721
1726
  handlerton *hton= plugin_data(plugin, handlerton *);
1722
1727
  if (hton->state == SHOW_OPTION_YES && hton->flush_logs && 
1781
1786
 
1782
1787
bool
1783
1788
Ha_delete_table_error_handler::
1784
 
handle_error(uint sql_errno,
 
1789
handle_error(uint sql_errno  __attribute__((__unused__)),
1785
1790
             const char *message,
1786
 
             MYSQL_ERROR::enum_warning_level level,
1787
 
             THD *thd)
 
1791
             MYSQL_ERROR::enum_warning_level level __attribute__((__unused__)),
 
1792
             THD *thd __attribute__((__unused__)))
1788
1793
{
1789
1794
  /* Grab the error message */
1790
1795
  strmake(buff, message, sizeof(buff)-1);
2359
2364
  @param first_value         (OUT) the first value reserved by the handler
2360
2365
  @param nb_reserved_values  (OUT) how many values the handler reserved
2361
2366
*/
2362
 
void handler::get_auto_increment(uint64_t offset, uint64_t increment,
2363
 
                                 uint64_t nb_desired_values,
 
2367
void handler::get_auto_increment(uint64_t offset __attribute__((__unused__)),
 
2368
                                 uint64_t increment __attribute__((__unused__)),
 
2369
                                 uint64_t nb_desired_values __attribute__((__unused__)),
2364
2370
                                 uint64_t *first_value,
2365
2371
                                 uint64_t *nb_reserved_values)
2366
2372
{
2661
2667
  @return
2662
2668
    Returns true if this is a temporary error
2663
2669
*/
2664
 
bool handler::get_error_message(int error, String* buf)
 
2670
bool handler::get_error_message(int error __attribute__((__unused__)),
 
2671
                                String* buf __attribute__((__unused__)))
2665
2672
{
2666
2673
  return false;
2667
2674
}
3357
3364
/**
3358
3365
  Init a key cache if it has not been initied before.
3359
3366
*/
3360
 
int ha_init_key_cache(const char *name, KEY_CACHE *key_cache)
 
3367
int ha_init_key_cache(const char *name __attribute__((__unused__)),
 
3368
                      KEY_CACHE *key_cache)
3361
3369
{
3362
3370
  DBUG_ENTER("ha_init_key_cache");
3363
3371
 
3616
3624
                  contain scan parameters.
3617
3625
*/
3618
3626
 
3619
 
ha_rows 
 
3627
ha_rows
3620
3628
handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
3621
 
                                     void *seq_init_param, uint n_ranges_arg,
 
3629
                                     void *seq_init_param,
 
3630
                                     uint n_ranges_arg __attribute__((__unused__)),
3622
3631
                                     uint *bufsz, uint *flags, COST_VECT *cost)
3623
3632
{
3624
3633
  KEY_MULTI_RANGE range;
3769
3778
 
3770
3779
int
3771
3780
handler::multi_range_read_init(RANGE_SEQ_IF *seq_funcs, void *seq_init_param,
3772
 
                               uint n_ranges, uint mode, HANDLER_BUFFER *buf)
 
3781
                               uint n_ranges, uint mode,
 
3782
                               HANDLER_BUFFER *buf __attribute__((__unused__)))
3773
3783
{
3774
3784
  DBUG_ENTER("handler::multi_range_read_init");
3775
3785
  mrr_iter= seq_funcs->init(seq_init_param, n_ranges, mode);
3991
4001
  @retval other  Error
3992
4002
*/
3993
4003
 
3994
 
int DsMrr_impl::dsmrr_fill_buffer(handler *unused)
 
4004
int DsMrr_impl::dsmrr_fill_buffer(handler *unused __attribute__((__unused__)))
3995
4005
{
3996
4006
  char *range_info;
3997
4007
  int res;
4459
4469
int handler::read_range_first(const key_range *start_key,
4460
4470
                              const key_range *end_key,
4461
4471
                              bool eq_range_arg,
4462
 
                              bool sorted /* ignored */)
 
4472
                              bool sorted  __attribute__((__unused__)))
4463
4473
{
4464
4474
  int result;
4465
4475
  DBUG_ENTER("handler::read_range_first");
4591
4601
  @retval
4592
4602
    pointer             pointer to TYPELIB structure
4593
4603
*/
4594
 
static my_bool exts_handlerton(THD *unused, plugin_ref plugin,
 
4604
static my_bool exts_handlerton(THD *unused __attribute__((__unused__)),
 
4605
                               plugin_ref plugin,
4595
4606
                               void *arg)
4596
4607
{
4597
4608
  List<char> *found_exts= (List<char> *) arg;