diff options
author | unknown <jimw@rama.(none)> | 2006-08-17 12:25:40 -0700 |
---|---|---|
committer | unknown <jimw@rama.(none)> | 2006-08-17 12:25:40 -0700 |
commit | 915bdfbea873dd064edc28905945f2f098bb83e2 (patch) | |
tree | 049d464ebbe02c19d780b0f231fb2b7b2789b6af /sql/sql_class.h | |
parent | dba52b539acd899e5713b86d92512e16597e72f5 (diff) | |
download | mariadb-git-915bdfbea873dd064edc28905945f2f098bb83e2.tar.gz |
Bug #2717: include/my_global.h mis-defines __attribute__
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
__attribute__((format(...))) safely, make more use of the format attribute,
and fix some of the warnings that this turns up (plus a bonus unrelated one).
include/m_ctype.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
is available from different versions of gcc and g++.
include/my_sys.h:
Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
Fix various format specifiers
Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
Cast pointers to correct type for %lx
sql/set_var.cc:
Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
Fix format specifier
sql/slave.h:
Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
Fix number of arguments passed for formatting, and fix acl_host_or_ip being
passed instead of just the hostname.
sql/sql_class.h:
Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index e8fe175cd7c..fe5ceb4c754 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -145,7 +145,7 @@ public: bool no_auto_events_arg, ulong max_size); void new_file(bool need_lock= 1); bool write(THD *thd, enum enum_server_command command, - const char *format,...); + const char *format, ...) ATTRIBUTE_FORMAT(printf, 4, 5); bool write(THD *thd, const char *query, uint query_length, time_t query_start=0); bool write(Log_event* event_info); // binary log write |