~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/field.h

Renamed __attribute__((__unused__)) to __attribute__((unused)). 
It takes up a few less chars, but also seems to be the standard usage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  void operator=(Field &);
52
52
public:
53
53
  static void *operator new(size_t size) {return sql_alloc(size); }
54
 
  static void operator delete(void *ptr_arg __attribute__((__unused__)),
55
 
                              size_t size __attribute__((__unused__)))
 
54
  static void operator delete(void *ptr_arg __attribute__((unused)),
 
55
                              size_t size __attribute__((unused)))
56
56
  { TRASH(ptr_arg, size); }
57
57
 
58
58
  uchar         *ptr;                   // Position to field in record
218
218
  virtual enum_field_types real_type() const { return type(); }
219
219
  inline  int cmp(const uchar *str) { return cmp(ptr,str); }
220
220
  virtual int cmp_max(const uchar *a, const uchar *b,
221
 
                      uint max_len __attribute__((__unused__)))
 
221
                      uint max_len __attribute__((unused)))
222
222
    { return cmp(a, b); }
223
223
  virtual int cmp(const uchar *,const uchar *)=0;
224
224
  virtual int cmp_binary(const uchar *a,const uchar *b,
225
 
                         uint32_t  __attribute__((__unused__)) max_length=~0)
 
225
                         uint32_t  __attribute__((unused)) max_length=~0)
226
226
  { return memcmp(a,b,pack_length()); }
227
227
  virtual int cmp_offset(uint row_offset)
228
228
  { return cmp(ptr,ptr+row_offset); }
230
230
  { return cmp_binary(ptr, ptr+row_offset); };
231
231
  virtual int key_cmp(const uchar *a,const uchar *b)
232
232
  { return cmp(a, b); }
233
 
  virtual int key_cmp(const uchar *str, uint length __attribute__((__unused__)))
 
233
  virtual int key_cmp(const uchar *str, uint length __attribute__((unused)))
234
234
  { return cmp(ptr,str); }
235
235
  virtual uint decimals() const { return 0; }
236
236
  /*
319
319
      null_ptr=ADD_TO_PTR(null_ptr,ptr_diff,uchar*);
320
320
  }
321
321
  virtual void get_image(uchar *buff, uint length,
322
 
                         CHARSET_INFO *cs __attribute__((__unused__)))
 
322
                         CHARSET_INFO *cs __attribute__((unused)))
323
323
    { memcpy(buff,ptr,length); }
324
324
  virtual void set_image(const uchar *buff,uint length,
325
 
                         CHARSET_INFO *cs __attribute__((__unused__)))
 
325
                         CHARSET_INFO *cs __attribute__((unused)))
326
326
    { memcpy(ptr,buff,length); }
327
327
 
328
328
 
353
353
  */
354
354
 
355
355
  virtual uint get_key_image(uchar *buff, uint length,
356
 
                             imagetype type __attribute__((__unused__)))
 
356
                             imagetype type __attribute__((unused)))
357
357
  {
358
358
    get_image(buff, length, &my_charset_bin);
359
359
    return length;
423
423
  {
424
424
    return unpack(to, from, max_length, low_byte_first);
425
425
  }
426
 
  virtual uint packed_col_length(const uchar *to __attribute__((__unused__)),
 
426
  virtual uint packed_col_length(const uchar *to __attribute__((unused)),
427
427
                                 uint length)
428
428
  { return length;}
429
429
  virtual uint max_packed_col_length(uint max_length)
430
430
  { return max_length;}
431
431
 
432
432
  virtual int pack_cmp(const uchar *a,const uchar *b,
433
 
                       uint key_length_arg __attribute__((__unused__)),
434
 
                       my_bool insert_or_update __attribute__((__unused__)))
 
433
                       uint key_length_arg __attribute__((unused)),
 
434
                       my_bool insert_or_update __attribute__((unused)))
435
435
  { return cmp(a,b); }
436
436
  virtual int pack_cmp(const uchar *b,
437
 
                       uint key_length_arg __attribute__((__unused__)),
438
 
                       my_bool insert_or_update __attribute__((__unused__)))
 
437
                       uint key_length_arg __attribute__((unused)),
 
438
                       my_bool insert_or_update __attribute__((unused)))
439
439
  { return cmp(ptr,b); }
440
440
  uint offset(uchar *record)
441
441
  {
448
448
  virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; }
449
449
  virtual CHARSET_INFO *sort_charset(void) const { return charset(); }
450
450
  virtual bool has_charset(void) const { return false; }
451
 
  virtual void set_charset(CHARSET_INFO *charset_arg __attribute__((__unused__)))
 
451
  virtual void set_charset(CHARSET_INFO *charset_arg __attribute__((unused)))
452
452
  { }
453
453
  virtual enum Derivation derivation(void) const
454
454
  { return DERIVATION_IMPLICIT; }
455
 
  virtual void set_derivation(enum Derivation derivation_arg __attribute__((__unused__)))
 
455
  virtual void set_derivation(enum Derivation derivation_arg __attribute__((unused)))
456
456
  { }
457
457
  bool set_warning(MYSQL_ERROR::enum_warning_level, unsigned int code,
458
458
                   int cuted_increment);
536
536
 
537
537
   @returns 0 no bytes written.
538
538
*/
539
 
  virtual int do_save_field_metadata(uchar *metadata_ptr __attribute__((__unused__)))
 
539
  virtual int do_save_field_metadata(uchar *metadata_ptr __attribute__((unused)))
540
540
  { return 0; }
541
541
};
542
542
 
671
671
  uint32_t max_display_length() { return 4; }
672
672
 
673
673
  virtual uchar *pack(uchar* to, const uchar *from,
674
 
                      uint max_length __attribute__((__unused__)),
675
 
                      bool low_byte_first __attribute__((__unused__)))
 
674
                      uint max_length __attribute__((unused)),
 
675
                      bool low_byte_first __attribute__((unused)))
676
676
  {
677
677
    *to= *from;
678
678
    return to + 1;
679
679
  }
680
680
 
681
681
  virtual const uchar *unpack(uchar* to, const uchar *from,
682
 
                              uint param_data __attribute__((__unused__)),
683
 
                              bool low_byte_first __attribute__((__unused__)))
 
682
                              uint param_data __attribute__((unused)),
 
683
                              bool low_byte_first __attribute__((unused)))
684
684
  {
685
685
    *to= *from;
686
686
    return from + 1;
727
727
  { return (field_metadata & 0x00ff); }
728
728
  uint row_pack_length() { return pack_length(); }
729
729
  virtual bool zero_pack() const { return 0; }
730
 
  bool optimize_range(uint idx __attribute__((__unused__)),
731
 
                      uint part __attribute__((__unused__)))
 
730
  bool optimize_range(uint idx __attribute__((unused)),
 
731
                      uint part __attribute__((unused)))
732
732
  { return 0; }
733
733
  bool eq_def(Field *field);
734
734
  bool has_charset(void) const { return true; }