~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_handler.c

  • Committer: Monty Taylor
  • Date: 2008-10-05 01:08:28 UTC
  • Revision ID: monty@inaugust.com-20081005010828-unkb3ynt73e7lmni
Moved compile_time_assert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
595
595
    that every HA_ERR_xxx constant has a corresponding error message in
596
596
    handler_error_messages[] list (check mysys/ma_handler_errors.h and
597
597
    include/my_base.h).
 
598
 
 
599
    TODO: Remove fix the handler_error_messages so that this hack isn't 
 
600
          necessary.
598
601
  */
599
 
  compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
600
 
                      HA_ERR_LAST + 1);
 
602
#ifdef __GNUC__
 
603
  char compile_time_assert[(HA_ERR_FIRST +
 
604
                            array_elements(handler_error_messages) ==
 
605
                            HA_ERR_LAST + 1) ? 1 : -1]
 
606
      __attribute__ ((__unused__));
 
607
#endif
601
608
  my_error_register(handler_error_messages, HA_ERR_FIRST,
602
609
                    HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
603
610
}